mirror of
https://github.com/netbox-community/netbox.git
synced 2026-03-31 22:53:21 +02:00
Refactor source IP resolution logic
This commit is contained in:
@@ -67,7 +67,10 @@ class TokenSerializer(ValidatedModelSerializer):
|
||||
|
||||
class Meta:
|
||||
model = Token
|
||||
fields = ('id', 'url', 'display', 'user', 'created', 'expires', 'key', 'write_enabled', 'description', 'allowed_ips')
|
||||
fields = (
|
||||
'id', 'url', 'display', 'user', 'created', 'expires', 'key', 'write_enabled', 'description',
|
||||
'allowed_ips',
|
||||
)
|
||||
|
||||
def to_internal_value(self, data):
|
||||
if 'key' not in data:
|
||||
|
||||
Reference in New Issue
Block a user