{% if data is not none and "object_id" in data %}
{% with obj = get_object_if_current_user_has_read_permissions(data.object_id) %}
{% if not (obj is none) %}
{{ obj.data['name']['text'] }} (#{{ obj.object_id }})
{% else %}
#{{ data.object_id }}
{% endif %}
{% endwith %}
{% else %}
—
{% endif %}