Made sure to re-cache the superuser bypass correctly.

This commit is contained in:
Griatch 2015-01-03 18:44:21 +01:00
parent 2e3a19840e
commit 4e4d8484d4
2 changed files with 2 additions and 8 deletions

View file

@ -106,14 +106,6 @@ class ObjectDB(TypedObject):
# Database manager
objects = ObjectDBManager()
# field-related field-related properties
def _at_db_player_postsave(self):
"""
This hook is called automatically after the player field is saved.
"""
# we need to re-cache this for superusers to bypass.
self.locks.cache_lock_bypass(self)
# cmdset_storage property handling
def __cmdset_storage_get(self):
"getter"

View file

@ -199,6 +199,8 @@ class DefaultPlayer(PlayerDB):
ScriptDB.objects.validate(obj=obj)
if normal_mode:
obj.at_post_puppet()
# re-cache locks to make sure superuser bypass is updated
obj.locks.cache_lock_bypass(obj)
return True
def unpuppet_object(self, sessid):