Added data migration for character-control list attribute.
This commit is contained in:
parent
85d4250f1d
commit
1223b46edd
2 changed files with 4 additions and 1 deletions
|
|
@ -22,6 +22,8 @@ class Migration(SchemaMigration):
|
|||
if player.db_obj:
|
||||
player.db_objs.add(player.db_obj)
|
||||
player.save()
|
||||
# set attribute for multisession_mode 2 use
|
||||
player.set_attribute("_playable_characters", [player.db_obj])
|
||||
|
||||
def backwards(self, orm):
|
||||
# Removing M2M table for field db_objs on 'PlayerDB'
|
||||
|
|
|
|||
|
|
@ -397,7 +397,8 @@ class PlayerDB(TypedObject):
|
|||
data - dictionary of optional data
|
||||
sessid - session sending this data
|
||||
"""
|
||||
if _MULTISESSION_MODE < 2: sessid = None
|
||||
if _MULTISESSION_MODE < 2:
|
||||
sessid = None
|
||||
character = _GA(self, "get_character")(sessid=sessid)
|
||||
if character:
|
||||
# execute command on character
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue