Fixes #20912: Clear ModuleBay parent when module assignment removed (#20974)

This commit is contained in:
Jason Novinger
2025-12-12 15:31:59 -06:00
committed by GitHub
parent ec13a79907
commit 598f8d034d
2 changed files with 28 additions and 0 deletions

View File

@@ -1222,6 +1222,8 @@ class ModuleBay(ModularComponentModel, TrackingModelMixin, MPTTModel):
def save(self, *args, **kwargs):
if self.module:
self.parent = self.module.module_bay
else:
self.parent = None
super().save(*args, **kwargs)