refactor: add guard clause for readability
This commit is contained in:
parent
0b4858d8e5
commit
83e6e2e68a
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user