diff --git a/shuffle-tools/1.2.0/src/app.py b/shuffle-tools/1.2.0/src/app.py index 934cd364..ef7eb955 100644 --- a/shuffle-tools/1.2.0/src/app.py +++ b/shuffle-tools/1.2.0/src/app.py @@ -1816,6 +1816,7 @@ def check_cache_contains(self, key, value, append): "search": str(value), "key": key, } + directcall = False allvalues = {} try: @@ -1859,6 +1860,7 @@ def check_cache_contains(self, key, value, append): if "success" not in allvalues: get_response = requests.post(url, json=data, verify=False) allvalues = get_response.json() + directcall = True try: if allvalues["value"] == None or allvalues["value"] == "null": @@ -1977,11 +1979,13 @@ def check_cache_contains(self, key, value, append): if value not in allvalues["value"] and isinstance(allvalues["value"], list): self.cache_update_buffer.append(value) allvalues["value"].append(value) - #set_url = "%s/api/v1/orgs/%s/set_cache" % (self.url, org_id) - #response = requests.post(set_url, json=data, verify=False) exception = "" try: - #allvalues = response.json() + if directcall: + set_url = "%s/api/v1/orgs/%s/set_cache" % (self.url, org_id) + response = requests.post(set_url, json=data, verify=False) + allvalues = response.json() + #return allvalues return {