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

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Tue Oct 9 12:51:54 CEST 2012


Author: torsten
Date: 2012-10-09 12:51:54 +0200 (Tue, 09 Oct 2012)
New Revision: 6106

Modified:
   base/trunk/mpulsweb/controllers/administration.py
Log:
Do not load agency overview if evalserver is not enabled


Modified: base/trunk/mpulsweb/controllers/administration.py
===================================================================
--- base/trunk/mpulsweb/controllers/administration.py	2012-10-09 07:53:45 UTC (rev 6105)
+++ base/trunk/mpulsweb/controllers/administration.py	2012-10-09 10:51:54 UTC (rev 6106)
@@ -109,9 +109,11 @@
             state.agency = agency
             c.form_result = validator.to_python(request.params, state)
             c.uo = UserObject()
-            agency_overview = MpulsAgencyOverview()
-            agency_overview.search('')
-            c.agency_list = agency_overview.getDatasets()
+            # Load the agency list if application is running as evaluation server
+            if g.mpuls_config.is_enabled('module', 'agency-overview'):
+                agency_overview = MpulsAgencyOverview()
+                agency_overview.search('')
+                c.agency_list = agency_overview.getDatasets()
             # Set initial data which is needed to create a new user
             login = c.form_result.get('login', '')
             role = c.form_result.get('role', '')



More information about the Mpuls-commits mailing list