Skip to content

Commit

Permalink
Quota scope filter in RequestFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
a-belhadj committed Sep 18, 2023
1 parent 05475c2 commit e2bb596
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions service_catalog/filters/request_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from django_filters import MultipleChoiceFilter

from Squest.utils.squest_filter import SquestFilter
from profiles.models import Scope, AbstractScope
from service_catalog.models import Request
from service_catalog.models.operations import OperationType
from service_catalog.models.request import RequestState
Expand All @@ -19,6 +20,12 @@ class Meta:
choices=[],
widget=SelectMultiple(attrs={'data-live-search': "true"}))

instance__quota_scope = MultipleChoiceFilter(
label="Quota scope",
choices=AbstractScope.objects.filter(id__in=Scope.objects.values_list("id", flat=True)).values_list("id",
"name"),
widget=SelectMultiple(attrs={'data-live-search': "true"}))

operation__type = MultipleChoiceFilter(
label="Type",
choices=OperationType.choices,
Expand Down

0 comments on commit e2bb596

Please sign in to comment.