Skip to content

Commit

Permalink
fix: reposting error `AttributeError: 'datetime.timedelta' object has…
Browse files Browse the repository at this point in the history
… no attribute 'replace'`

(cherry picked from commit eeda264)
  • Loading branch information
s-aga-r authored and mergify[bot] committed Nov 28, 2022
1 parent 65ac84e commit 4b0c9b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/stock/stock_ledger.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def repost_future_sle(

def validate_item_warehouse(args):
for field in ["item_code", "warehouse", "posting_date", "posting_time"]:
if not args.get(field):
if args.get(field) in [None, ""]:
validation_msg = f"The field {frappe.unscrub(field)} is required for the reposting"
frappe.throw(_(validation_msg))

Expand Down

0 comments on commit 4b0c9b6

Please sign in to comment.