diff --git a/cancel_order.py b/cancel_order.py index c24fb8d..9bdd342 100644 --- a/cancel_order.py +++ b/cancel_order.py @@ -7,8 +7,6 @@ from models import EpicenterOrder, CancelReason, db def get_cancel_reason_name(reason_ukr: str): try: - # Connect to the database - db.connect() # Query the CancelReason table cancel_reason = ( @@ -17,9 +15,6 @@ def get_cancel_reason_name(reason_ukr: str): .first() ) - # Close the database connection - db.close() - if cancel_reason: return cancel_reason.name else: