From 55565f23c00016ec32373d02bed978499a9943e9 Mon Sep 17 00:00:00 2001 From: Griatch Date: Sun, 14 Apr 2013 23:19:27 +0200 Subject: [PATCH] Updated a data migration to properly set Attribute _last_puppet. This allows players in MULTISESSION_MODE=0,1 to auto-puppet from the start. --- .../migrations/0014_add_attr__playable_characters.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/players/migrations/0014_add_attr__playable_characters.py b/src/players/migrations/0014_add_attr__playable_characters.py index fe5471954..285a82548 100644 --- a/src/players/migrations/0014_add_attr__playable_characters.py +++ b/src/players/migrations/0014_add_attr__playable_characters.py @@ -40,6 +40,12 @@ class Migration(DataMigration): db_obj=player, db_lock_storage=lockstring, db_value=val) + if char: + val = pickle.dumps(("dbobj", PackedDBobject(char.id, "objectdb", char.db_key))) + orm['players.PlayerAttribute'].objects.create(db_key="_last_puppet", + db_obj=player, + db_value=val) + suser = char and char.id == 1 if suser: # move the superuser unmask attribute for the superuser (note that this