From 04f26a1221784d1c7cc1c0bf784ae3c12270e78b Mon Sep 17 00:00:00 2001 From: Michal Konecny Date: Aug 20 2024 09:57:33 +0000 Subject: [mailman3] Fix the rest API on mailman The API didn't work and failed with 500, because the REST framework didn't know how to render the response. This fixes the issue. https://pagure.io/fedora-infrastructure/issue/12134 Signed-off-by: Michal Konecny --- diff --git a/roles/mailman3/templates/settings.py.j2 b/roles/mailman3/templates/settings.py.j2 index d7d33c2..029f981 100644 --- a/roles/mailman3/templates/settings.py.j2 +++ b/roles/mailman3/templates/settings.py.j2 @@ -323,6 +323,9 @@ Q_CLUSTER = { # REST_FRAMEWORK = { 'PAGE_SIZE': 10, + 'DEFAULT_RENDERER_CLASSES': [ + 'rest_framework.renderers.JSONRenderer', + ], 'DEFAULT_FILTER_BACKENDS': ( 'rest_framework.filters.OrderingFilter', ),