mailman remove list fails due to constraint error on contentfilter

Bug #1117174 reported by David Bell
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GNU Mailman
Fix Released
High
Barry Warsaw

Bug Description

running the mailman3 command mailman remove <list> throws an IntegrityError when run agains postgres.

psycopg2.IntegrityError: update or delete on table "mailinglist" violates foreign key constraint "contentfilter_mailing_list_id" on table "contentfilter"
DETAIL: Key (id)=(6) is still referenced from table "contentfilter".

Schema requires a cascade delete or the code should delete the filters first.

Tags: mailman3
Revision history for this message
Aurélien Bompard (abompard) wrote :

Since SQLite does not do cascade deletes IIRC, here's a patch to remove the content filters first (it's a very simple patch, and contains the test suite).

Barry Warsaw (barry)
Changed in mailman:
milestone: none → 3.0.0b4
assignee: nobody → Barry Warsaw (barry)
importance: Undecided → High
status: New → In Progress
status: In Progress → Fix Committed
Barry Warsaw (barry)
Changed in mailman:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.