Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Internal Server Error: 'owner_id' Not Updated when Creating Task #45

Open
SureshPradhana opened this issue Aug 7, 2024 · 0 comments
Open

Comments

@SureshPradhana
Copy link
Contributor

Creating a new task on http://localhost/docs#/tasks/tasks-create_task throws an internal server error. The owner_id is not being set, resulting in a NotNullViolation error.

Reproduction

  1. Start local development:
    docker compose up
  2. Go to http://localhost/docs#/tasks/tasks-create_task.
  3. Authorize and click "Try it out".
  4. Execute the request.

Logs:

backend-1      | sqlalchemy.exc.IntegrityError: (psycopg.errors.NotNullViolation) null value in column "owner_id" violates not-null constraint
backend-1      | [parameters: {'title': 'string', 'description': 'string', 'priority_id': 0, 'duration': 0, 'due': datetime.datetime(2024, 8, 7, 7, 40, 12, 702000, tzinfo=TzInfo(UTC)), 'id': UUID('3fa85f64-5717-4562-b3fc-2c963f66afa6'), 'owner_id': None}]

Note:

currentuser.id is not being updated correctly, leading to a null owner_id.

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

No branches or pull requests

1 participant