Added ability to store creator, updater, date of create and date of edit on entities- columns for this added to Voucher and CampData.
Removed permission check from Service::loadById- caused access violation when user had not have read permission.
This commit is contained in:
@@ -349,6 +349,8 @@ void ShopService::saveVoucher(VoucherPtr entity)
|
||||
Transaction tr;
|
||||
odb::database *db = Context::instance().db();
|
||||
|
||||
addDateAndUser(entity, true);
|
||||
|
||||
db->persist(entity);
|
||||
|
||||
foreach (QSharedPointer<VoucherItem> item, entity->items()) {
|
||||
@@ -371,6 +373,8 @@ void ShopService::updateVoucher(VoucherPtr entity)
|
||||
db->persist(item);
|
||||
}
|
||||
|
||||
addDateAndUser(entity, false);
|
||||
|
||||
db->update(entity);
|
||||
|
||||
tr.commit();
|
||||
|
||||
Reference in New Issue
Block a user