From cc504b7fef083ede5ef429a812ae69c2296c7eee Mon Sep 17 00:00:00 2001 From: Jonathan Weth <git@jonathanweth.de> Date: Sun, 3 May 2020 19:41:38 +0200 Subject: [PATCH] Use lazy wrapper for preferences --- aleksis/core/preferences.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aleksis/core/preferences.py b/aleksis/core/preferences.py index 70cbeab13..6693aff1f 100644 --- a/aleksis/core/preferences.py +++ b/aleksis/core/preferences.py @@ -155,10 +155,12 @@ class PrimaryGroupField(ChoicePreference): section = account name = "primary_group_field" default = "name" - choices = Person.syncable_fields_choices_lazy() required = False verbose_name = _("Field on person to match primary group against") + def get_choices(self): + return Person.syncable_fields_choices() + @site_preferences_registry.register class SchoolName(StringPreference): -- GitLab