From 2c4c5cb0c122d3bf6700276ec6cdd2c28ba36a9a Mon Sep 17 00:00:00 2001 From: J08nY Date: Thu, 6 Jul 2017 23:21:01 +0200 Subject: Use an utility function on PGPMailingList class. --- src/mailman_pgp/plugin.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/mailman_pgp/plugin.py') diff --git a/src/mailman_pgp/plugin.py b/src/mailman_pgp/plugin.py index 2a8207c..2b59236 100644 --- a/src/mailman_pgp/plugin.py +++ b/src/mailman_pgp/plugin.py @@ -52,8 +52,7 @@ class PGPMailman: @classhandler.handler(ListDeletedEvent) def on_delete(mlist): - pgp_list = PGPMailingList.query().filter_by( - list_id=mlist.list_id).first() + pgp_list = PGPMailingList.for_list(mlist) if pgp_list: with transaction() as session: # TODO shred the list key -- cgit v1.2.3-70-g09d2