Skip to content

Commit

Permalink
fix: handle NoneType error for vehicle no in e-Waybill api
Browse files Browse the repository at this point in the history
  • Loading branch information
ljain112 committed Nov 28, 2023
1 parent f78144b commit 699a1b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions india_compliance/gst_india/utils/e_waybill.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def update_vehicle_info(*, doctype, docname, values):
values = frappe.parse_json(values)
doc.db_set(
{
"vehicle_no": values.vehicle_no.replace(" ", ""),
"vehicle_no": values.get("vehicle_no", "").replace(" ", ""),
"lr_no": values.lr_no,
"lr_date": values.lr_date,
"mode_of_transport": values.mode_of_transport,
Expand Down Expand Up @@ -458,7 +458,7 @@ def extend_validity(*, doctype, docname, values):

doc.db_set(
{
"vehicle_no": values.vehicle_no.replace(" ", ""),
"vehicle_no": values.get("vehicle_no", "").replace(" ", ""),
"lr_no": values.lr_no,
"mode_of_transport": values.mode_of_transport,
}
Expand Down

0 comments on commit 699a1b3

Please sign in to comment.