Ignore:
Timestamp:
7 Jul 2015, 17:39:34 (9 years ago)
Author:
Henrik Bettermann
Message:

Call expensive_actions_allowed also in update method of waeupo.kofa.applicants.browser.ExportJobContainerJobStart?.update()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py

    r13133 r13152  
    2323from datetime import datetime, date
    2424from zope.event import notify
    25 from zope.component import getUtility, createObject, getAdapter
     25from zope.component import getUtility, queryUtility, createObject, getAdapter
    2626from zope.catalog.interfaces import ICatalog
    2727from zope.i18n import translate
     
    12541254
    12551255    def update(self):
     1256        import pdb; pdb.set_trace()
     1257        utils = queryUtility(IKofaUtils)
     1258        if not utils.expensive_actions_allowed():
     1259            self.flash(_(
     1260                "Currently, exporters cannot be started due to high "
     1261                "system load. Please try again later."), type='danger')
     1262            self.entries = doll_up(self, user=None)
     1263            return
    12561264        exporter = 'applicants'
    12571265        container_code = self.context.__parent__.code
Note: See TracChangeset for help on using the changeset viewer.