Skip to content

Commit 60e5ca7

Browse files
committed
fix mypy error
1 parent d06d941 commit 60e5ca7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

piccolo/columns/base.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -372,11 +372,11 @@ def _validate_default(
372372
):
373373
self._validated = True
374374
return True
375-
else:
376-
raise ValueError(
377-
f"The default {default} isn't one of the permitted types - "
378-
f"{allowed_types}"
379-
)
375+
376+
raise ValueError(
377+
f"The default {default} isn't one of the permitted types - "
378+
f"{allowed_types}"
379+
)
380380

381381
def _validate_choices(
382382
self, choices: t.Type[Enum], allowed_type: t.Type[t.Any]

tests/apps/migrations/auto/integration/test_migrations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def test_uuid_column(self):
152152
UUID(default=uuid.uuid4),
153153
UUID(default=uuid_default),
154154
UUID(default=UUID4()),
155-
UUID(null=True),
155+
UUID(null=True, default=None),
156156
UUID(null=False),
157157
UUID(index=True),
158158
UUID(index=False),

0 commit comments

Comments
 (0)