[Mpuls-commits] r6097 - base/trunk/mpulsweb/controllers
scm-commit at wald.intevation.org
scm-commit at wald.intevation.org
Fri Oct 5 12:49:42 CEST 2012
Author: roland
Date: 2012-10-05 12:49:41 +0200 (Fri, 05 Oct 2012)
New Revision: 6097
Modified:
base/trunk/mpulsweb/controllers/administration.py
Log:
Load the agency list if application is running as evaluation server
Modified: base/trunk/mpulsweb/controllers/administration.py
===================================================================
--- base/trunk/mpulsweb/controllers/administration.py 2012-10-05 08:27:06 UTC (rev 6096)
+++ base/trunk/mpulsweb/controllers/administration.py 2012-10-05 10:49:41 UTC (rev 6097)
@@ -33,7 +33,7 @@
import logging
import formencode
-from pylons import request, tmpl_context as c
+from pylons import request, tmpl_context as c, app_globals as g
from pylons.controllers.util import redirect
from mpulsweb.lib.translation import _
@@ -90,9 +90,13 @@
c.form_errors = {}
c.form_result = {}
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()
+
return render('/administration/new_user.mako')
@checkRole('admin')
More information about the Mpuls-commits
mailing list