fix: correct rollback problem
All checks were successful
ci / docker (push) Successful in 52s

This commit is contained in:
2026-03-29 13:06:22 +02:00
parent 87b8de01d7
commit bb5aaa47ad

View File

@@ -233,7 +233,7 @@ def create_interface():
try: try:
create_entry(form, user) create_entry(form, user)
except IntegrityError as e: except IntegrityError as e:
session.rollback() db.session.rollback()
# TODO: this only works for PG # TODO: this only works for PG
if isinstance(e.orig, UniqueViolation): if isinstance(e.orig, UniqueViolation):
return ("A service with this name already exists (possibly by another user)", 409) return ("A service with this name already exists (possibly by another user)", 409)
@@ -366,7 +366,7 @@ def default():
try: try:
db.session.commit() db.session.commit()
except IntegrityError as e: except IntegrityError as e:
session.rollback() db.session.rollback()
# TODO: this only works for PG # TODO: this only works for PG
if isinstance(e.orig, UniqueViolation): if isinstance(e.orig, UniqueViolation):
return ("Status at this time already submitted", 409) return ("Status at this time already submitted", 409)