Use proper in-line import in Request helper.
authorLennard de Rijk <ljvderijk@gmail.com>
Fri, 24 Jul 2009 20:57:53 +0200
changeset 2677 7df4d0fcbb80
parent 2676 a7fabd1534f8
child 2678 a525a55833f1
Use proper in-line import in Request helper.
app/soc/logic/helper/request.py
--- a/app/soc/logic/helper/request.py	Fri Jul 24 20:56:08 2009 +0200
+++ b/app/soc/logic/helper/request.py	Fri Jul 24 20:57:53 2009 +0200
@@ -22,9 +22,6 @@
   ]
 
 
-import soc.logic.models as model_logic
-
-
 def completeRequestForRole(role_entity, role_name):
   """Marks the request that leads to the given role_entity as completed.
   
@@ -36,8 +33,7 @@
    
   """
 
-  # get the request logic so we can query the datastore
-  request_logic = model_logic.request.logic
+  from soc.logic.models.request import logic as request_logic
 
   # create the query properties for the specific role
   properties = {'scope_path' : role_entity.scope_path,
@@ -49,5 +45,5 @@
 
   # mark the request completed, if there is any
   if request_entity:
-    request_logic.updateEntityProperties(request_entity,
-        {'status': 'completed'})
+    request_logic.updateEntityProperties(
+        request_entity, {'status': 'completed'})