mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-25 21:41:27 +00:00
feat: move get_subdomain to parent class
This commit is contained in:
parent
4d898f4ee8
commit
78dec5c347
|
@ -25,10 +25,13 @@ class UpdateServicesFlakeList(Migration):
|
|||
return "Check if all required services are in the flake list"
|
||||
|
||||
def is_migration_needed(self):
|
||||
with FlakeServiceManager:
|
||||
if not manager.services == CORRECT_SERVICES_LIST:
|
||||
# this do not delete custom links for testing
|
||||
for key, value in manager.services.items():
|
||||
if key not in CORRECT_SERVICES_LIST:
|
||||
return True
|
||||
|
||||
def migrate(self):
|
||||
with FlakeServiceManager:
|
||||
manager.services = CORRECT_SERVICES_LIST
|
||||
for key, value in CORRECT_SERVICES_LIST.items():
|
||||
if key not in manager.services:
|
||||
manager.services[key] = value
|
||||
|
|
Loading…
Reference in a new issue