move dao_create/dao_update fn to dao_utils

they're totally generic anyway
This commit is contained in:
Leo Hemsted
2020-08-14 17:37:16 +01:00
parent bdf2253298
commit 2e8a7c2444
3 changed files with 11 additions and 19 deletions

View File

@@ -73,3 +73,9 @@ def version_class(*version_options):
def dao_rollback():
db.session.rollback()
@transactional
def dao_save_object(obj):
# add/update object in db
db.session.add(obj)