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

api.db: fix Database.update method #577

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

JenySadadia
Copy link
Collaborator

Fixes #575

Database update method was breaking while creating a User model with is_superuser=1 field value.
Fix the method by separating Node specific logic from other model updates based on below facts:

  • obj.update() will trigger BeanieBaseUser.update() for User model and not DatabaseModel.update()
  • User model doesn't have parent field

Database `update` method was breaking while creating a
`User` model with `is_superuser=1` field value.
Fix the method by separating `Node` specific logic from
other model updates based on below facts:
- `obj.update()` will trigger `BeanieBaseUser.update()` for `User`
model and not `DatabaseModel.update()`
- `User` model doesn't have `parent` field

Signed-off-by: Jeny Sadadia <[email protected]>
Copy link
Contributor

@pawiecz pawiecz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JenySadadia JenySadadia added this pull request to the merge queue Nov 27, 2024
Merged via the queue into kernelci:main with commit 5b3a798 Nov 27, 2024
6 checks passed
@JenySadadia JenySadadia deleted the fix-superuser-creation branch November 27, 2024 11:59
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

Successfully merging this pull request may close these issues.

BUG: Not able to create a super user
2 participants