Refactor to_objectchange()

This commit is contained in:
jeremystretch
2022-01-26 20:25:23 -05:00
parent eb00e20269
commit b67859832a
7 changed files with 27 additions and 42 deletions

View File

@@ -904,8 +904,9 @@ class IPAddress(PrimaryModel):
super().save(*args, **kwargs)
def to_objectchange(self, action):
# Annotate the assigned object, if any
return super().to_objectchange(action, related_object=self.assigned_object)
objectchange = super().to_objectchange(action)
objectchange.related_object = self.assigned_object
return objectchange
@property
def family(self):