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

LCFS - Admin User Saving gives null error in Production #1591

Closed
3 tasks
AlexZorkin opened this issue Jan 3, 2025 · 1 comment · Fixed by #1615
Closed
3 tasks

LCFS - Admin User Saving gives null error in Production #1591

AlexZorkin opened this issue Jan 3, 2025 · 1 comment · Fixed by #1615
Assignees
Labels
Added Banana 4 Scale Label for tickets added mid-sprint bug Something isn't working Critical Ticket is critical and top priority Tested w/ issues Testing did not pass

Comments

@AlexZorkin
Copy link
Collaborator

AlexZorkin commented Jan 3, 2025

Description
Address the “User Admin Saving” bug that occurs when attempting to save role changes on a user in Production. The error message indicates the database receives a None value for user_profile_id, triggering a null-value constraint failure.

https://lcfs-prod.apps.silver.devops.gov.bc.ca/login

Purpose
Ensure successful role changes for users in the admin interface without encountering null-value errors. Guarantee that role updates in Production align with database constraints and do not halt the save operation.

Acceptance Criteria

  • Investigate code paths that set user_profile_id to None during a role change.
  • Update logic or schema to handle null values correctly, or ensure a valid integer is always provided.
  • Validate that user role changes no longer produce errors in Production.

Additional context

  • The issue surfaces as an autoflush error in SQLAlchemy when user_profile_id is unexpectedly null.
  • Production logs confirm that role change attempts fail due to the disallowed null value.
  • A thorough review of role update flows will help prevent similar bugs in the future.
@AlexZorkin AlexZorkin added bug Something isn't working Critical Ticket is critical and top priority labels Jan 3, 2025
@RebekahRFord RebekahRFord added the Added Banana 4 Scale Label for tickets added mid-sprint label Jan 3, 2025
@hamed-valiollahi hamed-valiollahi self-assigned this Jan 6, 2025
@Grulin
Copy link
Collaborator

Grulin commented Jan 10, 2025

Still getting an error message here when trying to change roles in the PROD environment for an IDIR user. Please see screenshot for error message:

Image

@Grulin Grulin added the Tested w/ issues Testing did not pass label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Added Banana 4 Scale Label for tickets added mid-sprint bug Something isn't working Critical Ticket is critical and top priority Tested w/ issues Testing did not pass
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants