skip deferred fields
in locationgroup init to prevent infinite recursion
This commit is contained in:
parent
cbf3479a13
commit
4a37e63a2d
1 changed files with 5 additions and 4 deletions
|
@ -354,13 +354,14 @@ class LocationGroup(Location, models.Model):
|
|||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
deferred_fields = self.get_deferred_fields()
|
||||
self._orig = {
|
||||
"priority": self.priority,
|
||||
"hierarchy": self.hierarchy,
|
||||
"category_id": self.category_id,
|
||||
"color": self.color,
|
||||
key: getattr(self, key)
|
||||
for key in ["priority", "hierarchy", "category", "color"]
|
||||
if key not in deferred_fields
|
||||
}
|
||||
|
||||
|
||||
locations = []
|
||||
|
||||
def details_display(self, editor_url=True, **kwargs):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue