Skip to content

Commit dc2f675

Browse files
authored
Merge pull request #194 from netbox-community/bug/193-tenant-filtering
Fixes: #180 - add TenancyFilterset to Tenant filtered models
2 parents 6dfb25f + 3b0b5fb commit dc2f675

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This plugin provide following Models:
1616
| NetBox 3.5 | >= 0.10.0 |
1717
| NetBox 3.6 | >= 0.11.0 |
1818
| NetBox 3.7 | >= 0.12.0 |
19-
| NetBox 4.0 | >= 0.13.0 |
19+
| NetBox 4.0 | >= 0.13.2 |
2020

2121
## Installation
2222

netbox_bgp/filtersets.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from django.db.models import Q
44
from netaddr.core import AddrFormatError
55
from netbox.filtersets import NetBoxModelFilterSet
6+
from tenancy.filtersets import TenancyFilterSet
67

78
from .models import (
89
Community, BGPSession, RoutingPolicy, RoutingPolicyRule,
@@ -13,7 +14,7 @@
1314
from dcim.models import Device, Site
1415

1516

16-
class CommunityFilterSet(NetBoxModelFilterSet):
17+
class CommunityFilterSet(NetBoxModelFilterSet, TenancyFilterSet):
1718

1819
class Meta:
1920
model = Community
@@ -65,7 +66,7 @@ def search(self, queryset, name, value):
6566
return queryset.filter(qs_filter)
6667

6768

68-
class BGPSessionFilterSet(NetBoxModelFilterSet):
69+
class BGPSessionFilterSet(NetBoxModelFilterSet, TenancyFilterSet):
6970

7071
remote_as = django_filters.ModelMultipleChoiceFilter(
7172
field_name='remote_as__asn',

netbox_bgp/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.13.1"
1+
__version__ = "0.13.2"

0 commit comments

Comments
 (0)