From f734e9511c399ab1db94bbd9e8d82ea02423e69f Mon Sep 17 00:00:00 2001 From: Griatch Date: Fri, 1 Feb 2013 21:03:03 +0100 Subject: [PATCH] Handle the case of doing aliases= instead of aliases=[] in create_object - this caused the malformed data to be stored in cache and causing tracebacks in cmdhandler until @reloaded. --- src/commands/default/building.py | 1 + src/objects/models.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands/default/building.py b/src/commands/default/building.py index 7ed8872f27..47ef5bf3a4 100644 --- a/src/commands/default/building.py +++ b/src/commands/default/building.py @@ -665,6 +665,7 @@ class CmdDig(ObjManipCommand): if not typeclass: typeclass = settings.BASE_EXIT_TYPECLASS + print typeclass, to_exit["name"], location, to_exit["aliases"],lockstring, new_room, caller new_to_exit = create.create_object(typeclass, to_exit["name"], location, aliases=to_exit["aliases"], locks=lockstring, destination=new_room, report_to=caller) diff --git a/src/objects/models.py b/src/objects/models.py index c3c3c6d245..21bcdda2d0 100644 --- a/src/objects/models.py +++ b/src/objects/models.py @@ -230,7 +230,7 @@ class ObjectDB(TypedObject): for alias in make_iter(aliases): new_alias = Alias(db_key=alias, db_obj=self) new_alias.save() - set_prop_cache(self, "_aliases", aliases) + set_prop_cache(self, "_aliases", make_iter(aliases)) #@aliases.deleter def __aliases_del(self): "Deleter. Allows for del self.aliases"