Run migrations! Another update to the tag structure, the previous migration did not correctly handle all tags, leaving some to get the wrong db_object fields. Also cleaned up the api for many of the Tag-related manager methods that now determins the db_model themselves without needing to give it as an argument. This resolves an issue with Permissions not being set correctly on the character level.

This commit is contained in:
Griatch 2017-01-25 22:06:54 +01:00
parent 5960985e65
commit 8b1d16fd5c
3 changed files with 16 additions and 18 deletions

View file

@ -1945,7 +1945,7 @@ class CmdExamine(ObjManipCommand):
if perms:
perms_string = (", ".join(perms))
else:
perms_string = "Default"
perms_string = "<None>"
if obj.is_superuser:
perms_string += " [Superuser]"
@ -2004,9 +2004,10 @@ class CmdExamine(ObjManipCommand):
string += self.format_attributes(obj)
# display Tags
tags_string = utils.fill(", ".join(tag for tag in obj.tags.all()), indent=5)
tags_string = utils.fill(", ".join("%s[%s]" % (tag, category)
for tag, category in obj.tags.all(return_key_and_category=True)), indent=5)
if tags_string:
string += "\n|wTags|n: %s" % tags_string
string += "\n|wTags[category]|n: %s" % tags_string.strip()
# add the contents
exits = []