properly load and reinitialize contents cache
This commit is contained in:
parent
7395d7091d
commit
7f8619d2c7
1 changed files with 2 additions and 1 deletions
|
|
@ -60,7 +60,7 @@ class ContentsHandler:
|
||||||
Returns:
|
Returns:
|
||||||
Objects (list of ObjectDB)
|
Objects (list of ObjectDB)
|
||||||
"""
|
"""
|
||||||
return list(self.obj.locations_set.all())
|
return list(obj for obj in self.obj.locations_set.all() if obj.pk)
|
||||||
|
|
||||||
def init(self):
|
def init(self):
|
||||||
"""
|
"""
|
||||||
|
|
@ -68,6 +68,7 @@ class ContentsHandler:
|
||||||
|
|
||||||
"""
|
"""
|
||||||
objects = self.load()
|
objects = self.load()
|
||||||
|
self._typecache = defaultdict(dict)
|
||||||
self._pkcache = {obj.pk: True for obj in objects}
|
self._pkcache = {obj.pk: True for obj in objects}
|
||||||
for obj in objects:
|
for obj in objects:
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue