Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Using Serial field leads "Input should be a valid integer" when trying to add new row to the table #385

Open
metakot opened this issue Apr 11, 2024 · 0 comments

Comments

@metakot
Copy link

metakot commented Apr 11, 2024

piccolo==1.5.0
piccolo_admin==1.3.2
piccolo_api==1.4.0

So I have a table in postgres:

class Example(Table):
    number = Serial()

When I click on "Add row" in admin interface, the request to /admin/api/tables/example/new/ fails with a bunch of traceback ending in a following error:

pydantic_core._pydantic_core.ValidationError: 1 validation error for ExampleOptional
number
  Input should be a valid integer [type=int_type, input_value=DEFAULT, input_type=Unquoted]
    For further information visit https://errors.pydantic.dev/2.6/v/int_type

And that leads to improperly filled contents of the Add Item page.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant