|
a/Allura/allura/lib/macro.py |
|
b/Allura/allura/lib/macro.py |
|
... |
|
... |
93 |
q = dict(
|
93 |
q = dict(
|
94 |
neighborhood_id=c.project.neighborhood_id,
|
94 |
neighborhood_id=c.project.neighborhood_id,
|
95 |
deleted=False,
|
95 |
deleted=False,
|
96 |
shortname={'$ne':'--init--'})
|
96 |
shortname={'$ne':'--init--'})
|
97 |
if labels:
|
97 |
if labels:
|
98 |
q['labels'] = {'$all':labels.split(',')}
|
98 |
or_labels = labels.split('|')
|
|
|
99 |
q['$or'] = [{'labels': {'$all': l.split(',')}} for l in or_labels]
|
99 |
if category is not None:
|
100 |
if category is not None:
|
100 |
category = M.ProjectCategory.query.get(name=category)
|
101 |
category = M.ProjectCategory.query.get(name=category)
|
101 |
if category is not None:
|
102 |
if category is not None:
|
102 |
q['category_id'] = category._id
|
103 |
q['category_id'] = category._id
|
103 |
pq = M.Project.query.find(q)
|
104 |
pq = M.Project.query.find(q)
|