Changeset 13565 for main


Ignore:
Timestamp:
4 Jan 2016, 10:33:46 (9 years ago)
Author:
Henrik Bettermann
Message:

Let admin be able to change accommodation session.

File:
1 edited

Legend:

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

    r13533 r13565  
    175175            catalog = getUtility(ICatalog, name='beds_catalog')
    176176            beds = catalog.searchResults(bed_type=(None,None))
    177             if len(beds):
     177            if len(beds) and not self.request.principal.id == 'admin':
    178178                self.flash(_('You can\'t change the booking session '
    179179                             'before clearing all hostels.'),
    180180                           type='warning')
    181181                return
    182         self.applyData(self.context, **data)
    183         self.flash(_('Settings have been saved.'))
     182        msave(self, **data)
    184183        return
    185184
Note: See TracChangeset for help on using the changeset viewer.