From 2e39131b31d4f1bd0ac09a18dc80dc9302229330 Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Wed, 22 Aug 2012 19:16:28 -0400 Subject: [PATCH] Tiny fix to handle when data_or_params isn't passed in --- lms/lib/comment_client/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lms/lib/comment_client/utils.py b/lms/lib/comment_client/utils.py index 4e8beec079..f9fde7f3d7 100644 --- a/lms/lib/comment_client/utils.py +++ b/lms/lib/comment_client/utils.py @@ -20,6 +20,8 @@ def merge_dict(dic1, dic2): return dict(dic1.items() + dic2.items()) def perform_request(method, url, data_or_params=None, *args, **kwargs): + if data_or_params is None: + data_or_params = {} data_or_params['api_key'] = settings.API_KEY if method in ['post', 'put', 'patch']: response = requests.request(method, url, data=data_or_params)