Pass category from objtag lockfunc. Resolve #2149

This commit is contained in:
Griatch 2020-06-28 11:22:07 +02:00
parent 67cc36e86e
commit 0f0ddcd6be

View file

@ -539,7 +539,9 @@ def objtag(accessing_obj, accessed_obj, *args, **kwargs):
Only true if accessed_obj has the specified tag and optional
category.
"""
return bool(accessed_obj.tags.get(*args))
tagkey = args[0] if args else None
category = args[1] if len(args) > 1 else None
return bool(accessed_obj.tags.get(tagkey, category=category))
def inside(accessing_obj, accessed_obj, *args, **kwargs):