#7 New Form
* extends KonovaCode filtering for parent objects matching given input
This commit is contained in:
parent
ea0a07890c
commit
49a9d03471
@ -107,7 +107,9 @@ class KonovaCodeAutocomplete(Select2QuerySetView):
|
|||||||
q_or = Q()
|
q_or = Q()
|
||||||
q_or |= Q(long_name__icontains=self.q)
|
q_or |= Q(long_name__icontains=self.q)
|
||||||
q_or |= Q(short_name__icontains=self.q)
|
q_or |= Q(short_name__icontains=self.q)
|
||||||
qs = qs.filter(q_or)
|
q_or |= Q(parent__long_name__icontains=self.q)
|
||||||
|
q_or |= Q(parent__short_name__icontains=self.q)
|
||||||
|
qs = qs.filter(q_or).distinct()
|
||||||
return qs
|
return qs
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user