Ignore:
Timestamp:
17 Nov 2014, 06:29:21 (10 years ago)
Author:
Henrik Bettermann
Message:

Add more tests and solve problems which are unveiled thy these tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/browser/pages.py

    r11975 r11977  
    262262    login_button = label
    263263
     264    def _comment(self, customer):
     265        return getattr(customer, 'suspended_comment', None)
     266
    264267    def update(self, SUBMIT=None, camefrom=None):
    265268        self.camefrom = camefrom
     
    16131616    def _searchUser(self, identifier, email):
    16141617        # Search customer
    1615         #cat = queryUtility(ICatalog, name='customers_catalog')
    1616         #results = cat.searchResults(
    1617             #reg_number=(identifier, identifier),
    1618         #    email=(email,email))
    1619         #for result in results:
    1620         #    if result.customer_id == identifier or \
    1621         #        result.reg_number == identifier or \
    1622         #        result.matric_number == identifier:
    1623         #        return result
     1618        cat = queryUtility(ICatalog, name='customers_catalog')
     1619        results = cat.searchResults(
     1620            reg_number=(identifier, identifier),
     1621            email=(email,email))
     1622        for result in results:
     1623            if result.customer_id == identifier \
     1624                or result.reg_number == identifier:
     1625                return result
    16241626        # Search portal user
    16251627        user = grok.getSite()['users'].get(identifier, None)
Note: See TracChangeset for help on using the changeset viewer.