#2325 Remove ProjectLock entries of a project when deleting the project
Closed 6 years ago by mprahl. Opened 6 years ago by mprahl.

No commits found

In my development environment, I ran into an issue where if I deleted a project, I couldn't create a new project because of a database error. The database error resulted from a ProjectLock entry already existing for the new project's ID (which was the ID of the deleted project).

This seems odd to me considering ProjectLock is set to to cascade on delete of the project. I wonder if it's because it has two primary keys in the table.

Not sure @pingou will allow querying in view :p

We should fix this in the model.py to ensure the foreign key is cleared on deletion

@pingou so it seems like this only happens in SQLite.

Maybe we could try to replicate the issue with a test then we can investigate further what's going on and what is the best fix.

Pull-Request has been closed by mprahl

6 years ago
Metadata