mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-17 13:08:16 -06:00
Optimize returning allowed_ips or 'Any'
Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
This commit is contained in:
parent
b1e0f2d5fa
commit
77c3d67c47
@ -62,9 +62,7 @@ class TokenAdmin(admin.ModelAdmin):
|
||||
]
|
||||
|
||||
def list_allowed_ips(self, obj):
|
||||
if obj.allowed_ips:
|
||||
return obj.allowed_ips
|
||||
return 'Any'
|
||||
return obj.allowed_ips or 'Any'
|
||||
list_allowed_ips.short_description = "Allowed IPs"
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user