Skip to content
Snippets Groups Projects
Commit b9f1ef2e authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Giving season choice for multi org forecast list

parent cd2fdf0e
No related branches found
No related tags found
1 merge request!4Giving season choice for multi org forecast list
......@@ -232,14 +232,14 @@ class ForecastConfiguration:
request_result = None
if settings.INCLUDE_ORGANIZATION_IDS == None:
print "%s://%s/rest/organizationforecastconfigurations/%s?from=%s-01-01&to=%s-12-31%s" % (
"""print "%s://%s/rest/organizationforecastconfigurations/%s?from=%s-01-01&to=%s-12-31%s" % (
settings.VIPSLOGIC_PROTOCOL,
settings.VIPSLOGIC_SERVER_NAME,
settings.VIPS_ORGANIZATION_ID,
season,
season,
crop_organism_id_paramstring
)
)"""
request_result = requests.get("%s://%s/rest/organizationforecastconfigurations/%s?from=%s-01-01&to=%s-12-31%s" % (
settings.VIPSLOGIC_PROTOCOL,
......@@ -251,11 +251,21 @@ class ForecastConfiguration:
)
)
else:
request_result = requests.get("%s://%s/rest/forecastconfigurationsincludeorgs/%s?includeOrganizationIds=%s" % (
"""print "%s://%s/rest/forecastconfigurationsincludeorgs/%s?includeOrganizationIds=%s&from=%s-01-01&to=%s-12-31" % (
settings.VIPSLOGIC_PROTOCOL,
settings.VIPSLOGIC_SERVER_NAME,
settings.VIPS_ORGANIZATION_ID,
",".join(str(x) for x in settings.INCLUDE_ORGANIZATION_IDS),
season,
season
)"""
request_result = requests.get("%s://%s/rest/forecastconfigurationsincludeorgs/%s?includeOrganizationIds=%s&from=%s-01-01&to=%s-12-31" % (
settings.VIPSLOGIC_PROTOCOL,
settings.VIPSLOGIC_SERVER_NAME,
settings.VIPS_ORGANIZATION_ID,
",".join(str(x) for x in settings.INCLUDE_ORGANIZATION_IDS)
",".join(str(x) for x in settings.INCLUDE_ORGANIZATION_IDS),
season,
season
)
)
return request_result
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment