mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-25 13:31:27 +00:00
feat: move get_subdomain to parent class
This commit is contained in:
parent
df4fdc0d0d
commit
894457d0b4
|
@ -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