Did some other modifications
This commit is contained in:
@@ -641,5 +641,22 @@ def get_all_invoice_ids(raffle_id):
|
||||
except Exception as e:
|
||||
logger.error(f"Error getting invoice IDs for raffle {raffle_id}: {e}")
|
||||
return []
|
||||
finally:
|
||||
conn.close()
|
||||
|
||||
def delete_reservation_timestamp(invoice_id):
|
||||
"""Clears the reservation_timestamp for a participant by invoice_id."""
|
||||
conn = connect_db()
|
||||
cur = conn.cursor()
|
||||
try:
|
||||
cur.execute(
|
||||
"UPDATE participants SET reservation_timestamp=NULL WHERE invoice_id=? AND step='waiting_for_payment'",
|
||||
(invoice_id,)
|
||||
)
|
||||
conn.commit()
|
||||
logger.info(f"Cleared reservation_timestamp for invoice {invoice_id}")
|
||||
except Exception as e:
|
||||
logger.error(f"Error clearing reservation_timestamp for invoice {invoice_id}: {e}")
|
||||
conn.rollback()
|
||||
finally:
|
||||
conn.close()
|
||||
Reference in New Issue
Block a user