Handle the case of doing aliases=<string> instead of aliases=[<string>] in create_object - this caused the malformed data to be stored in cache and causing tracebacks in cmdhandler until @reloaded.

This commit is contained in:
Griatch 2013-02-01 21:03:03 +01:00
parent 8eefc5d9f9
commit f734e9511c
2 changed files with 2 additions and 1 deletions

View file

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

View file

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