From e0b446d1c6c28b0e373c9a1a19b7cdea9b32c190 Mon Sep 17 00:00:00 2001
From: Bryan Brancotte <bryan.brancotte@pasteur.fr>
Date: Fri, 16 Jul 2021 10:27:35 +0200
Subject: [PATCH] don't put M2M in list display

---
 basetheme_bootstrap/admin.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/basetheme_bootstrap/admin.py b/basetheme_bootstrap/admin.py
index b5863cf..673c0cb 100644
--- a/basetheme_bootstrap/admin.py
+++ b/basetheme_bootstrap/admin.py
@@ -41,7 +41,7 @@ class UserPreferencesAdmin(admin.ModelAdmin):
         if field.name not in [
             "id",
             "user",
-        ]
+        ] and not field.many_to_many
     ]
     list_filter = [
         field.name
-- 
GitLab