(request, domain, app_id)
return json_response({
        'currentVersion': app_version,
        'latestBuild': latest_build_version,
        'latestReleasedBuild': latest_released_version if latest_released_version else None,
    })
Return current app version and the latest release
Return current app version and the latest release
Return current app version and the latest release
def current_app_version(request, domain, app_id):
    """
    Return current app version and the latest release
    """
    try:
        app_version = get_current_app_version(domain, app_id)
    except NoResultFound:
        # occurs when passed a build
        raise Http404
    latest_build_version = get_latest_build_version(domain, app_id)
    latest_released_version = get_latest_released_app_version(domain, app_id)
    return json_response({
        'currentVersion': app_version,
        'latestBuild': latest_build_version,
        'latestReleasedBuild': latest_released_version if latest_released_version else None,
    })
def current_app_version ( request , domain , app_id ) : try : app_version = get_current_app_version ( domain , app_id ) except NoResultFound : # occurs when passed a build raise Http404 latest_build_version = get_latest_build_version ( domain , app_id ) latest_released_version = get_latest_released_app_version ( domain , app_id ) return json_response ( { 'currentVersion' : app_version , 'latestBuild' : latest_build_version , 'latestReleasedBuild' : latest_released_version if latest_released_version else None , } )