Error when passing argument to custom tag in Django

Getting following error when using a custom tag that needs an argument. I am on Django version 4.2, does this still need a separate assignment to variable instead of using in if ? Or only other option I see is creating a filter

TemplateSyntaxError at /view/users/ "Unused 'PERM_CREATE_USER' at end of if expression"

Inside view

    {% load my_tags %}
    {% if has_permission 'PERM_CREATE_USER' %}
    <a>Create User</a>
    {% endif %}

#my_tags.py file

    @register.simple_tag(takes_context=True)
    def has_permission(context, perm):
       return True
Вернуться на верх