fix: update_nsm only in warehouse creation (#54165)

(cherry picked from commit b0e3fa3979)
This commit is contained in:
Nishka Gosalia
2026-04-09 15:57:22 +05:30
committed by Mergify
parent 8843068da9
commit e9c1a09af3

View File

@@ -65,7 +65,8 @@ class Warehouse(NestedSet):
self.warn_about_multiple_warehouse_account()
def on_update(self):
self.update_nsm_model()
if self.is_new() or self.has_value_changed("parent_warehouse"):
self.update_nsm_model()
def update_nsm_model(self):
frappe.utils.nestedset.update_nsm(self)