mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
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:
|
||||
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):
|
||||
"""
|
||||
|
|
@ -68,6 +68,7 @@ class ContentsHandler:
|
|||
|
||||
"""
|
||||
objects = self.load()
|
||||
self._typecache = defaultdict(dict)
|
||||
self._pkcache = {obj.pk: True for obj in objects}
|
||||
for obj in objects:
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue