mirror of
https://github.com/evennia/evennia.git
synced 2026-03-26 01:36:32 +01:00
Moved permissions into a the tag system as a separate handler. Permissions still don't work quite right yet.
This commit is contained in:
parent
2acff2d1ab
commit
06e858b3f6
21 changed files with 1003 additions and 389 deletions
|
|
@ -99,7 +99,6 @@ class TagManager(models.Manager):
|
|||
"""
|
||||
Get all tags on obj, optionally limited by key and/or category
|
||||
"""
|
||||
print "Key: %s, Category: %s" % (key, category)
|
||||
tags = _GA(obj, "db_tags").all()
|
||||
if key:
|
||||
tags = tags.filter(db_key__iexact=key.lower().strip())
|
||||
|
|
@ -153,10 +152,10 @@ class TagManager(models.Manager):
|
|||
tag.save()
|
||||
elif not tag:
|
||||
tag = self.create(db_key=key.lower().strip() if key!=None else None,
|
||||
db_category=category.lower().strip() if key!=None else None,
|
||||
db_category=category.lower().strip() if category and key!=None else None,
|
||||
db_data=str(data) if data!=None else None)
|
||||
tag.save()
|
||||
return tag
|
||||
return make_iter(tag)[0]
|
||||
|
||||
#
|
||||
# helper functions for the TypedObjectManager.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue