Commits

Michał Jaworski  committed fd9a780

remove mutable default parameter in function

  • Participants
  • Parent commits 39785b6

Comments (0)

Files changed (1)

File oauth_provider/utils.py

         request.user = user
     return user
 
-def require_params(oauth_request, parameters=[]):
+def require_params(oauth_request, parameters=None):
     """ Ensures that the request contains all required parameters. """
     params = [
         'oauth_consumer_key',
         'oauth_signature_method',
         'oauth_timestamp'
     ]
-    params.extend(parameters)
+    if parameters:
+        params.extend(parameters)
 
     missing = list(param for param in params if param not in oauth_request)
     if missing: