From a0823814c59d46c268bd9a9ee34d4e19c175d5c6 Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Wed, 29 Nov 2023 12:21:37 +0100 Subject: [PATCH] Hotfix: EcoAccount serializable * fixes bug where EcoAccount model was not serializable due to changes in newer DAL version due to Django4 --- compensation/autocomplete/eco_account.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compensation/autocomplete/eco_account.py b/compensation/autocomplete/eco_account.py index d1ea90f4..4e506815 100644 --- a/compensation/autocomplete/eco_account.py +++ b/compensation/autocomplete/eco_account.py @@ -32,3 +32,9 @@ class EcoAccountAutocomplete(Select2QuerySetView): Q(title__icontains=self.q) ).distinct() return qs + + def get_result_label(self, result): + return str(result) + + def get_selected_result_label(self, result): + return str(result)