Changeset 6551 for main/waeup.sirp


Ignore:
Timestamp:
23 Jul 2011, 15:14:15 (13 years ago)
Author:
uli
Message:

Remove strange exception catcher. I have no clue how to provoke that
kind of exception (ParseError?) while there are tons of other
(uncatched) exceptions that can occur with the search function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/catalog.py

    r6549 r6551  
    4040        return
    4141    hitlist = []
    42     try:
    43         if searchtype == 'history':
    44             results = Query().searchResults(
    45                 Text(('accesscodes_catalog', searchtype), query))
    46         elif searchtype == 'batch_serial':
    47             results = Query().searchResults(
    48                 Eq(('accesscodes_catalog', searchtype), int(query)))
    49         else:
    50             results = Query().searchResults(
    51                 Eq(('accesscodes_catalog', searchtype), query))
    52         for result in results:
    53             hitlist.append(AccessCodeQueryResultItem(result, view=view))
    54     except ParseError:
    55         view.flash('Search string not allowed.')
    56         return
     42    if searchtype == 'history':
     43        results = Query().searchResults(
     44            Text(('accesscodes_catalog', searchtype), query))
     45    elif searchtype == 'batch_serial':
     46        results = Query().searchResults(
     47            Eq(('accesscodes_catalog', searchtype), int(query)))
     48    else:
     49        results = Query().searchResults(
     50            Eq(('accesscodes_catalog', searchtype), query))
     51    for result in results:
     52        hitlist.append(AccessCodeQueryResultItem(result, view=view))
    5753    return hitlist
    58 
    59 
Note: See TracChangeset for help on using the changeset viewer.