Show
Ignore:
Timestamp:
02/17/10 16:38:55 (7 months ago)
Author:
olivier
Message:

merge r582 and r583 into telemeta 0.5.0 tag

Location:
tags/telemeta-0.5.0
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • tags/telemeta-0.5.0

  • tags/telemeta-0.5.0/telemeta/web/base.py

    r575 r584  
    240240            func = switch.get(key) 
    241241            if func and value and value != "0": 
    242                 res = func(value) 
    243                 if len(res) > 2: 
    244                     collections, items, value = res 
    245                 else:  
    246                     collections, items = res 
     242                try: 
     243                    res = func(value) 
     244                    if len(res) > 2: 
     245                        collections, items, value = res 
     246                    else:  
     247                        collections, items = res 
     248                except ObjectDoesNotExist: 
     249                    collections = collections.none() 
     250                    items = items.none() 
     251 
    247252                criteria[key] = value 
    248253