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
|
import uuid
|
||||||
|
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
|
@ -61,6 +62,7 @@ def save(
|
||||||
if item.voucher_type != VoucherType.KOT:
|
if item.voucher_type != VoucherType.KOT:
|
||||||
print_bill(voucher_id, db)
|
print_bill(voucher_id, db)
|
||||||
except SQLAlchemyError as e:
|
except SQLAlchemyError as e:
|
||||||
|
traceback.print_exc()
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
|
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
|
||||||
detail=str(e),
|
detail=str(e),
|
||||||
|
|
Loading…
Reference in New Issue