Don't run migration potentially getting new settings from gitlab when not needed

This commit is contained in:
Frisk 2021-05-03 18:21:37 +02:00
parent 46e9318e02
commit 89edc1b443
No known key found for this signature in database
GPG key ID: 213F7C15068AF8AC

View file

@ -8,13 +8,12 @@ import sys
from src.migrations.utils import return_example_file from src.migrations.utils import return_example_file
logger = logging.getLogger("rcgcdw.migrations.1.13.1.1") logger = logging.getLogger("rcgcdw.migrations.1.13.1.1")
base_file = return_example_file()
new_settings = settings.copy() new_settings = settings.copy()
def run(): def run():
global base_file
if "event_appearance" not in settings: if "event_appearance" not in settings:
logger.info("Running migration 1.13.1.1") logger.info("Running migration 1.13.1.1")
base_file = return_example_file()
if "event_appearance" not in base_file: # if local base file is outdated, download from repo if "event_appearance" not in base_file: # if local base file is outdated, download from repo
base_file = return_example_file(force=True) base_file = return_example_file(force=True)
try: try: