Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
bug 576215, More values for cat search param
Browse files Browse the repository at this point in the history
  • Loading branch information
davedash committed Jul 6, 2010
1 parent 304a201 commit a8926ba
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions apps/search/forms.py
Expand Up @@ -137,15 +137,18 @@ class _SearchForm(forms.Form):

def clean(self):
d = self.cleaned_data
raw = self.data

# Set some defaults
if not d.get('appid'):
d['appid'] = request.APP.id

if 'cat' in d:
if ',' in d['cat']:
(d['atype'], d['cat']) = map(int, d['cat'].split(','))
elif d['cat'] == 'all':
# Since not all categories are listed in this form, we use the raw
# data.
if 'cat' in raw:
if ',' in raw['cat']:
(d['atype'], d['cat']) = map(int, raw['cat'].split(','))
elif raw['cat'] == 'all':
d['cat'] = None

if 'page' not in d or not d['page'] or d['page'] < 1:
Expand Down

0 comments on commit a8926ba

Please sign in to comment.