Added traceback to save voucher to better understand why an error occurs.
This commit is contained in:
parent
e46fe7f90e
commit
f408e84af3
@ -1,3 +1,4 @@
|
||||
import traceback
|
||||
import uuid
|
||||
|
||||
from datetime import datetime, timedelta
|
||||
@ -61,6 +62,7 @@ def save(
|
||||
if item.voucher_type != VoucherType.KOT:
|
||||
print_bill(voucher_id, db)
|
||||
except SQLAlchemyError as e:
|
||||
traceback.print_exc()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
|
||||
detail=str(e),
|
||||
|
Loading…
Reference in New Issue
Block a user