Skip to content

Commit

Permalink
don't delete submitted draft through bulk actions
Browse files Browse the repository at this point in the history
  • Loading branch information
richardlences committed Jan 28, 2025
1 parent ebbb7d1 commit b86c6d3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def destroy
message_drafts_to_destroy_ids = message_threads.map(&:message_drafts).flatten.map(&:id)

message_threads.transaction do
MessageDraft.where(id: message_drafts_to_destroy_ids).destroy_all
MessageDraft.not_in_submission_process.where(id: message_drafts_to_destroy_ids).destroy_all
end

if message_drafts_to_destroy_ids.present?
Expand Down

0 comments on commit b86c6d3

Please sign in to comment.