find_disconnected_db_submissions()
does not check for disconnected replies
#7203
Labels
find_disconnected_db_submissions()
does not check for disconnected replies
#7203
Description
find_disconnected_fs_submissions()
checks for submission and reply files missing from the database, since their filenames exist in the same space:securedrop/securedrop/management/submissions.py
Lines 85 to 89 in f5ca29b
find_disconnected_db_submissions()
does not check for submission and reply records missing from the filesystem, since their IDs do not exist in the same space:securedrop/securedrop/management/submissions.py
Line 20 in f5ca29b
As a result,
manage.py delete-disconnected-db-submissions
cannot remove a disconnected reply.Steps to Reproduce
/var/lib/securedrop/store
.manage.py delete-disconnected-db-submissions
Expected Behavior
The reply is deleted from the database.
Actual Behavior
The reply is not deleted from the database.
Comments
The fundamental issue here is the subtyping within:
securedrop/securedrop/models.py
Line 116 in f5ca29b
For now we'd probably just want to add a separate
find_disconnected_db_replies()
function and iterate over that separately indelete_disconnected_db_replies()
.The text was updated successfully, but these errors were encountered: