()
return ret
Total hack function to get direct links to the cloud care application pages
Total hack function to get direct links to the cloud care application pages
Total hack function to get direct links to the cloud care application pages
def get_cloudcare_app():
    """
    Total hack function to get direct links to the cloud care application pages
    """

    from corehq.apps.cloudcare import api

    app = api.get_cloudcare_app(PACT_DOMAIN, PACT_CLOUD_APPNAME)
    app_id = app['_id']

    pact_cloudcare = [x for x in app['modules'] if x['name']['en'] == PACT_CLOUDCARE_MODULE]
    forms = pact_cloudcare[0]['forms']
    ret = dict((f['name']['en'], ix) for (ix, f) in enumerate(forms))

    ret['app_id'] = app_id
    ret['build_id'] = get_latest_build_id(PACT_DOMAIN, app_id)
    return ret
def get_cloudcare_app ( ) : from corehq . apps . cloudcare import api app = api . get_cloudcare_app ( PACT_DOMAIN , PACT_CLOUD_APPNAME ) app_id = app [ '_id' ] pact_cloudcare = [ x for x in app [ 'modules' ] if x [ 'name' ] [ 'en' ] == PACT_CLOUDCARE_MODULE ] forms = pact_cloudcare [ 0 ] [ 'forms' ] ret = dict ( ( f [ 'name' ] [ 'en' ] , ix ) for ( ix , f ) in enumerate ( forms ) ) ret [ 'app_id' ] = app_id ret [ 'build_id' ] = get_latest_build_id ( PACT_DOMAIN , app_id ) return ret