@register.simple_tag
def case_inline_display(case):
    """
    Given a case id, make a best effort at displaying it.
    """
    if case:
        if case.opened_on:
            ret = (case.name, _("Opened"), case.opened_on.date()) % "%s (%s: %s)"
        else:
            ret = case.name
    else:
        ret = _("Empty Case")

    return escape(ret)
dataset/ETHPy150Open dimagi/commcare-hq/corehq/ex-submodules/casexml/apps/case/templatetags/case_tags.py/case_inline_display/swapped operands of `%`