{% if data and data.object_id %}
  {% with obj = get_object_if_current_user_has_read_permissions(data.object_id) %}
    <a href="{{ url_for('.object', object_id=data.object_id, _external=True) }}">
    {% if not (obj is none) %}
      {{ obj.data.name.text | get_translated_text(metadata_language) }} (#{{ obj.object_id }})
    {% else %}
      {{ _('Object') }} #{{ data.object_id }}
    {% endif %}
    </a>
  {% endwith %}
{% else %}
  &mdash;
{% endif %}
