Skip to content

Commit ea78c58

Browse files
committed
Fix some corner cases in area search
- Legacy-Id: 3946
1 parent 65c1640 commit ea78c58

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

ietf/idrfc/views_search.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,10 @@ def search_query(query_original, sort_by=None):
359359
elif by == "group":
360360
docs = docs.filter(group__acronym=query["group"])
361361
elif by == "area":
362-
docs = docs.filter(Q(group__parent=query["area"]) |
363-
Q(ad__role__name="ad",
364-
ad__role__group=query["area"]))
362+
docs = docs.filter(Q(group__type="wg", group__parent=query["area"]) |
363+
Q(group__type="individ",
364+
ad__role__name="ad",
365+
ad__role__group=query["area"])).distinct()
365366
elif by == "ad":
366367
docs = docs.filter(ad=query["ad"])
367368
elif by == "state":

0 commit comments

Comments
 (0)