Find stateless app given its name

    First search the Django ORM, and if not found then look the app up in a local registry.
    If the app does not have an ORM entry then a StatelessApp model instance is created.

def find_stateless_by_name(name):
    '''
    Find stateless app given its name

    First search the Django ORM, and if not found then look the app up in a local registry.
    If the app does not have an ORM entry then a StatelessApp model instance is created.
    '''
    try:
        dsa_app = StatelessApp.objects.get(app_name=name) # pylint: disable=no-member
        return dsa_app.as_dash_app()
    except: # pylint: disable=bare-except
        pass

    dash_app = get_stateless_by_name(name)
    dsa_app = StatelessApp(app_name=name)
    dsa_app.save()
    return dash_app