|
1 | 1 | import strawberry_django |
2 | | -from netbox.graphql.filter_mixins import autotype_decorator, BaseFilterMixin |
| 2 | +from netbox.graphql.filter_mixins import BaseFilterMixin |
3 | 3 |
|
4 | | -from cesnet_service_path_plugin.models import Segment, ServicePath, ServicePathSegmentMapping, SegmentCircuitMapping |
5 | 4 | from cesnet_service_path_plugin.filtersets import ( |
| 5 | + SegmentCircuitMappingFilterSet, |
6 | 6 | SegmentFilterSet, |
7 | 7 | ServicePathFilterSet, |
8 | | - SegmentCircuitMappingFilterSet, |
9 | 8 | ServicePathSegmentMappingFilterSet, |
10 | 9 | ) |
| 10 | +from cesnet_service_path_plugin.models import ( |
| 11 | + Segment, |
| 12 | + SegmentCircuitMapping, |
| 13 | + ServicePath, |
| 14 | + ServicePathSegmentMapping, |
| 15 | +) |
11 | 16 |
|
12 | 17 |
|
13 | 18 | @strawberry_django.filter(Segment, lookups=True) |
14 | | -@autotype_decorator(SegmentFilterSet) |
15 | 19 | class SegmentFilter(BaseFilterMixin): |
16 | | - pass |
| 20 | + class Meta: |
| 21 | + filterset_class = SegmentFilterSet |
17 | 22 |
|
18 | 23 |
|
19 | 24 | @strawberry_django.filter(ServicePath, lookups=True) |
20 | | -@autotype_decorator(ServicePathFilterSet) |
21 | 25 | class ServicePathFilter(BaseFilterMixin): |
22 | | - pass |
| 26 | + class Meta: |
| 27 | + filterset_class = ServicePathFilterSet |
23 | 28 |
|
24 | 29 |
|
25 | 30 | @strawberry_django.filter(SegmentCircuitMapping, lookups=True) |
26 | 31 | class SegmentCircuitMappingFilter(SegmentCircuitMappingFilterSet): |
27 | | - pass |
| 32 | + class Meta: |
| 33 | + filterset_class = SegmentCircuitMappingFilterSet |
28 | 34 |
|
29 | 35 |
|
30 | 36 | @strawberry_django.filter(ServicePathSegmentMapping, lookups=True) |
31 | 37 | class ServicePathSegmentMappingFilter(ServicePathSegmentMappingFilterSet): |
32 | | - pass |
| 38 | + class Meta: |
| 39 | + filterset_class = ServicePathSegmentMappingFilterSet |
0 commit comments