From 4b97e70a4c83e05dbae9b2e0a1ac7f4e4a3e0345 Mon Sep 17 00:00:00 2001 From: Rocky Duan Date: Tue, 21 Aug 2012 17:10:29 -0700 Subject: [PATCH] fixed bug when no data is transmitted otherwise --- lms/lib/comment_client/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/lib/comment_client/utils.py b/lms/lib/comment_client/utils.py index 4e8beec079..327cc3936b 100644 --- a/lms/lib/comment_client/utils.py +++ b/lms/lib/comment_client/utils.py @@ -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)