Error While Updating User Policy - SQLite NOT NULL Constraint Violation - Printable Version +- Jellyfin Forum (https://forum.jellyfin.org) +-- Forum: Support (https://forum.jellyfin.org/f-support) +--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting) +--- Thread: Error While Updating User Policy - SQLite NOT NULL Constraint Violation (/t-error-while-updating-user-policy-sqlite-not-null-constraint-violation) |
Error While Updating User Policy - SQLite NOT NULL Constraint Violation - tinker - 2023-07-04 Hello, I have been trying to programmatically disable a user via the API and encountered a server-side error that I am unable to resolve. I am using the following Python script to make a POST request to the "/Users/{user_id}/Policy" endpoint: Code: import json Despite the user being successfully disabled, the script is returning a server-side error message that says: "Error processing request.". When checking the server logs, I found the following error: Code: Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. It seems like the server is trying to set the AuthenticationProviderId field of the Users table to NULL, which is causing a NOT NULL constraint violation. As this appears to be an issue with the server's attempt to process the request and update its database, I'm unsure how to proceed to rectify this. Does anyone have any idea what's going on here or if I'm doing something wrong? Thank you. RE: Error While Updating User Policy - SQLite NOT NULL Constraint Violation - crobibero - 2023-07-04 You can either query the database directly or visit each user on the dashboard. At least one of them is missing the AuthenticationProvider. |