Commit 4b97e70a by Rocky Duan

fixed bug when no data is transmitted otherwise

parent e3a3f709
......@@ -19,7 +19,7 @@ def extract(dic, keys):
def merge_dict(dic1, dic2):
return dict(dic1.items() + dic2.items())
def perform_request(method, url, data_or_params=None, *args, **kwargs):
def perform_request(method, url, data_or_params={}, *args, **kwargs):
data_or_params['api_key'] = settings.API_KEY
if method in ['post', 'put', 'patch']:
response = requests.request(method, url, data=data_or_params)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment