diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-09-28 15:20:26 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-09-28 15:20:26 +0200 |
commit | 9dc5ea0e947832e8c682c68df0aadbdc4bb27fa0 (patch) | |
tree | 03d65d4ae09ddf5403f711055e2202a166acdc4c /src/web/controllers | |
parent | Bugfix. (diff) | |
download | newspipe-9dc5ea0e947832e8c682c68df0aadbdc4bb27fa0.tar.gz newspipe-9dc5ea0e947832e8c682c68df0aadbdc4bb27fa0.tar.bz2 newspipe-9dc5ea0e947832e8c682c68df0aadbdc4bb27fa0.zip |
more tests
Diffstat (limited to 'src/web/controllers')
-rw-r--r-- | src/web/controllers/abstract.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/web/controllers/abstract.py b/src/web/controllers/abstract.py index 2a2e6f9f..5cebd39e 100644 --- a/src/web/controllers/abstract.py +++ b/src/web/controllers/abstract.py @@ -91,7 +91,10 @@ class AbstractController: obj = self._db_cls(**attrs) db.session.add(obj) - db.session.commit() + try: + db.session.commit() + except Exception as e: + logger.exception(str(e)) return obj def read(self, **filters): |