You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 19, 2025. It is now read-only.
I just got an exception when tried to create new database entry via await SomeModel.objects.create(...):
asyncpg.exceptions.NotNullViolationError: null value in column "id" violates not-null constraint
DETAIL: Failing row contains (null, John, Doe, a@b.c, 1997, M, null, f, null, f, 0, 0, null, 0, 0).
Model:
class SomeModel(Model):
__tablename__ = DATABASE_TABLE
__database__ = DATABASE
__metadata__ = DATABASE_METADATA
id = Integer(primary_key=True)
# Some other fields
According to examples it should work without providing id field manually. Maybe I am missing something?