Skip to content

Commit d3b8276

Browse files
committed
fixing a bug when running a migration with references="self"
1 parent 550f02d commit d3b8276

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

piccolo/apps/migrations/auto/serialisation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,8 @@ def deserialise_params(params: t.Dict[str, t.Any]) -> t.Dict[str, t.Any]:
225225
for key, value in params.items():
226226
# This is purely for backwards compatibility.
227227
if isinstance(value, str) and not isinstance(value, Enum):
228-
params[key] = deserialise_legacy_params(name=key, value=value)
228+
if value != "self":
229+
params[key] = deserialise_legacy_params(name=key, value=value)
229230
elif isinstance(value, SerialisedClass):
230231
params[key] = value.instance
231232
elif isinstance(value, SerialisedUUID):

0 commit comments

Comments
 (0)