mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-05 13:24:47 +00:00
refactor: add guard clause for readability
This commit is contained in:
@@ -953,7 +953,9 @@ class Item(WebsiteGenerator):
|
||||
d.variant_of = self.variant_of
|
||||
|
||||
def cant_change(self):
|
||||
if not self.get("__islocal"):
|
||||
if self.get("__islocal"):
|
||||
return
|
||||
|
||||
fields = ("has_serial_no", "is_stock_item", "valuation_method", "has_batch_no")
|
||||
|
||||
values = frappe.db.get_value("Item", self.name, fields, as_dict=True)
|
||||
|
||||
Reference in New Issue
Block a user