mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-10 04:53:11 +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"
|
return "Check if all required services are in the flake list"
|
||||||
|
|
||||||
def is_migration_needed(self):
|
def is_migration_needed(self):
|
||||||
with FlakeServiceManager:
|
# this do not delete custom links for testing
|
||||||
if not manager.services == CORRECT_SERVICES_LIST:
|
for key, value in manager.services.items():
|
||||||
|
if key not in CORRECT_SERVICES_LIST:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def migrate(self):
|
def migrate(self):
|
||||||
with FlakeServiceManager:
|
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