Fix some corner cases in area search
- Legacy-Id: 3946
This commit is contained in:
parent
65c16409f6
commit
ea78c5846a
|
@ -359,9 +359,10 @@ if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
|||
elif by == "group":
|
||||
docs = docs.filter(group__acronym=query["group"])
|
||||
elif by == "area":
|
||||
docs = docs.filter(Q(group__parent=query["area"]) |
|
||||
Q(ad__role__name="ad",
|
||||
ad__role__group=query["area"]))
|
||||
docs = docs.filter(Q(group__type="wg", group__parent=query["area"]) |
|
||||
Q(group__type="individ",
|
||||
ad__role__name="ad",
|
||||
ad__role__group=query["area"])).distinct()
|
||||
elif by == "ad":
|
||||
docs = docs.filter(ad=query["ad"])
|
||||
elif by == "state":
|
||||
|
|
Loading…
Reference in a new issue