[Mpuls-commits] r5497 - base/trunk/mpulsweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Oct 24 13:58:11 CEST 2011


Author: ludwig
Date: 2011-10-24 13:58:10 +0200 (Mon, 24 Oct 2011)
New Revision: 5497

Modified:
   base/trunk/mpulsweb/controllers/case_bundle.py
Log:
Issue 2162: Changed the filter_for_evaluation method to use case.editor
direct, without using the User object. It improves the performance of this 
method.


Modified: base/trunk/mpulsweb/controllers/case_bundle.py
===================================================================
--- base/trunk/mpulsweb/controllers/case_bundle.py	2011-10-24 11:27:59 UTC (rev 5496)
+++ base/trunk/mpulsweb/controllers/case_bundle.py	2011-10-24 11:58:10 UTC (rev 5497)
@@ -250,8 +250,7 @@
         return render('/casebundle/dialogs/error.mako')
     
     def _filter_for_evaluate(self, case):
-        return session['USER_AUTHORIZED'].getLogin()  \
-               == case.getEditor().getLogin()
+        return session['USER_AUTHORIZED'].id == int(case.editor)
 
     #
     # ACTIONS



More information about the Mpuls-commits mailing list