From b5273cccf79b2c84e995416b5c7d3d0ab8d2b3a3 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Sat, 27 Nov 2021 12:25:36 -0800 Subject: [PATCH] forms: Fix regression with TLS domain form in quassel and tt-rss Without the change, the list of domains in the app pages for tt-rss and quassel is empty. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/forms.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plinth/forms.py b/plinth/forms.py index c783b99b7..b2f207847 100644 --- a/plinth/forms.py +++ b/plinth/forms.py @@ -39,16 +39,16 @@ class DomainSelectionForm(forms.Form): 'changed later.'), choices=[]) +def _get_domain_choices(): + """Double domain entries for inclusion in the choice field.""" + from plinth.modules.names import get_available_tls_domains + return ((domain, domain) for domain in get_available_tls_domains()) + + class TLSDomainForm(forms.Form): """Form to select a TLS domain for an app.""" - - def get_domain_choices(): - """Double domain entries for inclusion in the choice field.""" - from plinth.modules.names import get_available_tls_domains - return ((domain, domain) for domain in get_available_tls_domains()) - domain = forms.ChoiceField( - choices=get_domain_choices(), + choices=_get_domain_choices, label=_('TLS domain'), help_text=_( 'Select a domain to use TLS with. If the list is empty, please '