Updated a data migration to properly set Attribute _last_puppet. This allows players in MULTISESSION_MODE=0,1 to auto-puppet from the start.

This commit is contained in:
Griatch 2013-04-14 23:19:27 +02:00
parent 17d7ad9b37
commit 55565f23c0

View file

@ -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