def model_str(instance, attr) -> str:
    """
    The field to display for an object's __str__. If the field doesn't exist then an
    alternative will be displayed.
    :param instance:    Instance object
    :param attr:        Field name to get data from if it exists
    :return:            str
    """
    return hasattr(instance, attr) and getattr(instance, attr) \
           or f'<{instance.__class__.__name__}: {instance.id}>'