mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
12 lines
334 B
Python
12 lines
334 B
Python
from django.db.models import QuerySet
|
|
|
|
|
|
class UserKeyQuerySet(QuerySet):
|
|
|
|
def active(self):
|
|
return self.filter(master_key_cipher__isnull=False)
|
|
|
|
def delete(self):
|
|
# Disable bulk deletion to avoid accidentally wiping out all copies of the master key.
|
|
raise Exception("Bulk deletion has been disabled.")
|