Skip to content

User's role field needs to have a cascade delete #369

@MarkKoz

Description

@MarkKoz

#357 replaced the FK with an ArrayField. This introduced a problem of the roles table falling out of sync with the users table. I encountered an issue when trying to sync a user with the bot. One of their roles had been deleted from the roles table, but it was still present in their roles field. The validator ensures all roles exist in the table, so the request was failing.

Apparently Django Postgres Extensions have a solution for this.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions