Explorar el Código

Fix issue with json

JoostSijm hace 5 años
padre
commit
e1d9aa41db
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      app/api.py

+ 2 - 2
app/api.py

@@ -61,7 +61,7 @@ def refill(state_id, capital_id, resource_id):
     current_state_id = int(re.sub('.*/', '', action))
     LOGGER.info('Current state %s', current_state_id)
 
-    data = {
+    json_data = {
         'tmp_gov': resource_id
     }
     params = {}
@@ -72,7 +72,7 @@ def refill(state_id, capital_id, resource_id):
         '{}parliament/donew/42/{}/0'.format(BASE_URL, resource_id),
         headers=HEADERS,
         params=params,
-        data=data
+        json=json_data
     )
 
     response = requests.get(