convert has_key to X in dictionary
[htsworkflow.git] / htsworkflow / auth.py
index 5688cc9c061231c560ade2fe0b694e238193dc82..1d781e19c3a44dda03bd9aacf4c5201a7010945e 100644 (file)
@@ -8,7 +8,7 @@ apidata = {'apiid': u'0', 'apikey': settings.DEFAULT_API_KEY}
 
 def require_api_key(request):
     # make sure we have the api component
-    if not (request.REQUEST.has_key('apiid') or request.REQUEST.has_key('apikey')):
+    if not ('apiid' in request.REQUEST or 'apikey' in request.REQUEST):
         raise PermissionDenied
 
     # make sure the id and key are right