style: format code with black

This commit is contained in:
Ankush Menat
2022-03-28 18:52:46 +05:30
parent 21e00da3d6
commit 494bd9ef78
1395 changed files with 91704 additions and 62532 deletions

View File

@@ -5,7 +5,12 @@ def execute():
frappe.reload_doc("stock", "doctype", "batch")
for batch in frappe.get_all("Batch", fields=["name", "batch_id"]):
batch_qty = frappe.db.get_value("Stock Ledger Entry",
{"docstatus": 1, "batch_no": batch.batch_id, "is_cancelled": 0},
"sum(actual_qty)") or 0.0
batch_qty = (
frappe.db.get_value(
"Stock Ledger Entry",
{"docstatus": 1, "batch_no": batch.batch_id, "is_cancelled": 0},
"sum(actual_qty)",
)
or 0.0
)
frappe.db.set_value("Batch", batch.name, "batch_qty", batch_qty, update_modified=False)