aboutsummaryrefslogtreecommitdiff
path: root/src/web/controllers/abstract.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/controllers/abstract.py')
-rw-r--r--src/web/controllers/abstract.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/web/controllers/abstract.py b/src/web/controllers/abstract.py
index 58532660..3c91e08a 100644
--- a/src/web/controllers/abstract.py
+++ b/src/web/controllers/abstract.py
@@ -91,11 +91,8 @@ class AbstractController:
obj = self._db_cls(**attrs)
db.session.add(obj)
- try:
- db.session.commit()
- except Exception as e:
- db.session.rollback()
- logger.exception(str(e))
+ db.session.flush()
+ db.session.commit()
return obj
def read(self, **filters):
bgstack15