Skip to content

Commit 73433d0

Browse files
committed
Cleanup
1 parent c5dab1e commit 73433d0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sqlmesh/migrations/v0087_normalize_blueprint_variables.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ def migrate(state_sync, **kwargs): # type: ignore
7575
node = parsed_snapshot["node"]
7676
python_env = node.get("python_env") or {}
7777

78+
migrate_snapshot = False
79+
7880
if blueprint_vars_executable := python_env.get(SQLMESH_BLUEPRINT_VARS):
7981
blueprint_vars = eval(blueprint_vars_executable["payload"])
8082

@@ -93,9 +95,10 @@ def migrate(state_sync, **kwargs): # type: ignore
9395
else:
9496
del blueprint_vars[var]
9597
blueprint_vars[lowercase_var] = value
96-
migration_needed = True
98+
migrate_snapshot = True
9799

98-
if migration_needed:
100+
if migrate_snapshot:
101+
migration_needed = True
99102
blueprint_vars_executable["payload"] = repr(blueprint_vars)
100103

101104
new_snapshots.append(

0 commit comments

Comments
 (0)