@frontend.route('/objects/<int:object_id>/versions/<int:version_id>')
@object_permissions_required(Permissions.READ, on_unauthorized=on_unauthorized)
def object_version(object_id, version_id):
    user_language_id = logic.languages.get_user_language(flask_login.current_user).id
    english = get_language(Language.ENGLISH)
    object = get_object(object_id=object_id, version_id=version_id)
    form = None
    user_permissions = get_user_object_permissions(object_id=object_id, user_id=flask_login.current_user.id)
    if (Permissions.WRITE in user_permissions):
        current_object = get_object(object_id=object_id)
        if (current_object.version_id != version_id):
            form = ObjectVersionRestoreForm()
    user_may_grant = (Permissions.GRANT in user_permissions)
    action = get_action_with_translation_in_language(object.action_id, user_language_id, use_fallback=True)
    action_type = get_action_type_with_translation_in_language(action.type_id, user_language_id)
    instrument = (get_instrument_with_translation_in_language(action.instrument_id, user_language_id) if action.instrument_id else None)
    object_languages = logic.languages.get_languages_in_object_data(object.data)
    languages = []
    for lang_code in object_languages:
        languages.append(get_language_by_lang_code(lang_code))
    metadata_language = flask.request.args.get('language', None)
    if (not any(((language.lang_code == metadata_language) for language in languages))):
        metadata_language = None
    return flask.render_template('objects/view/base.html', template_mode='view', show_object_type_and_id_on_object_page_text=get_user_settings(flask_login.current_user.id)['SHOW_OBJECT_TYPE_AND_ID_ON_OBJECT_PAGE'], show_object_title=get_user_settings(flask_login.current_user.id)['SHOW_OBJECT_TITLE'], languages=languages, metadata_language=metadata_language, ENGLISH=english, is_archived=True, object_type=action_type.translation.object_name, action=action, action_type=action_type, instrument=instrument, schema=object.schema, data=object.data, last_edit_datetime=object.utc_datetime, last_edit_user=get_user(object.user_id), get_object_if_current_user_has_read_permissions=get_object_if_current_user_has_read_permissions, object_id=object_id, version_id=version_id, link_version_specific_rdf=True, restore_form=form, get_user=get_user, user_may_grant=user_may_grant, get_action_type=get_action_type, get_action_type_with_translation_in_language=get_action_type_with_translation_in_language)
@frontend.route('/objects/<int:object_id>/versions/<int:version_id>')
@object_permissions_required(Permissions.READ, on_unauthorized=on_unauthorized)
def object_version(object_id, version_id):
    user_language_id = logic.languages.get_user_language(flask_login.current_user).id
    english = get_language(Language.ENGLISH)
    object = get_object(object_id=object_id, version_id=version_id)
    form = None
    user_permissions = get_user_object_permissions(object_id=object_id, user_id=flask_login.current_user.id)
    if (Permissions.WRITE in user_permissions):
        current_object = get_object(object_id=object_id)
        if (current_object.version_id != version_id):
            form = ObjectVersionRestoreForm()
    user_may_grant = (Permissions.GRANT in user_permissions)
    action = get_action_with_translation_in_language(object.action_id, user_language_id, use_fallback=True)
    action_type = get_action_type_with_translation_in_language(action.type_id, user_language_id)
    instrument = (get_instrument_with_translation_in_language(action.instrument_id, user_language_id) if action.instrument_id else None)
    object_languages = logic.languages.get_languages_in_object_data(object.data)
    languages = []
    for lang_code in object_languages:
        languages.append(get_language_by_lang_code(lang_code))
    metadata_language = flask.request.args.get('language', None)
    if (not any(((language.lang_code == metadata_language) for language in languages))):
        metadata_language = None
    return flask.render_template('objects/view/base.html', template_mode='view', show_object_type_and_id_on_object_page_text=get_user_settings(flask_login.current_user.id)['SHOW_OBJECT_TYPE_AND_ID_ON_OBJECT_PAGE'], show_object_title=get_user_settings(flask_login.current_user.id)['SHOW_OBJECT_TITLE'], languages=languages, metadata_language=metadata_language, ENGLISH=english, is_archived=True, object_type=action_type.translation.object_name, action=action, action_type=action_type, instrument=instrument, schema=object.schema, data=object.data, last_edit_datetime=object.utc_datetime, last_edit_user=get_user(object.user_id), get_object_if_current_user_has_read_permissions=get_object_if_current_user_has_read_permissions, object_id=object_id, version_id=version_id, link_version_specific_rdf=True, restore_form=form, get_user=get_user, user_may_grant=user_may_grant, get_action_type=get_action_type, get_action_type_with_translation_in_language=get_action_type_with_translation_in_language)