def get_apphook_model(model, app_config_attribute):
    """
    Return the AppHookConfig model for the provided main model

    :param model: Main model
    :param app_config_attribute: Fieldname of the app_config
    :return: app_config model
    """
    return model._meta.get_field(app_config_attribute).remote_field.model
