diff --git a/jwql/website/apps/jwql/router.py b/jwql/website/apps/jwql/router.py index 5b08fa440..dbfd9f3a2 100644 --- a/jwql/website/apps/jwql/router.py +++ b/jwql/website/apps/jwql/router.py @@ -59,6 +59,11 @@ def allow_migrate(self, db, app_label, model_name=None, **hints): Make sure the monitors apps only appear in the 'monitors' database. """ model_names = [name.replace("_", "") for name in MONITOR_TABLE_NAMES] - if app_label == 'jwql' and model_name in model_names: - return db == "monitors" + if app_label == 'jwql': + if model_name in model_names: + if db == "monitors": + return True + return False + elif db == "monitors": + return False return None