forked from Mirrors/Dispatcharr
breakclass command to reset network access settings
This commit is contained in:
parent
db7ca1a0c8
commit
0b63b1286f
1 changed files with 13 additions and 0 deletions
13
core/management/commands/reset_network_access.py
Normal file
13
core/management/commands/reset_network_access.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# your_app/management/commands/update_column.py
|
||||
|
||||
from django.core.management.base import BaseCommand
|
||||
from core.models import CoreSettings, NETWORK_ACCESS
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = "Reset network access settings"
|
||||
|
||||
def handle(self, *args, **options):
|
||||
setting = CoreSettings.objects.get(key=NETWORK_ACCESS)
|
||||
setting.value = "{}"
|
||||
setting.save()
|
||||
Loading…
Add table
Add a link
Reference in a new issue