mirror of
https://github.com/evennia/evennia.git
synced 2026-04-01 13:37:17 +02:00
Fixed ev.search_object_tag(), which was a bit too greedy before.
This commit is contained in:
parent
b1e08c7da6
commit
85225b3084
1 changed files with 2 additions and 1 deletions
|
|
@ -181,7 +181,8 @@ class TagManager(models.Manager):
|
|||
objclass = ContentType.objects.get_by_natural_key(*model.split(".", 1)).model_class()
|
||||
key_cands = Q(db_tags__db_key__iexact=key.lower().strip()) if key is not None else Q()
|
||||
cat_cands = Q(db_tags__db_category__iexact=category.lower().strip()) if category is not None else Q()
|
||||
return objclass.objects.filter(db_tags__db_model=model, db_tags__db_tagtype=tagtype).filter(key_cands & cat_cands)
|
||||
tag_crit = Q(db_tags__db_model=model, db_tags__db_tagtype=tagtype)
|
||||
return objclass.objects.filter(tag_crit & key_cands & cat_cands)
|
||||
|
||||
def create_tag(self, key=None, category=None, data=None, model="objects.objectdb", tagtype=None):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue