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 <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2021-11-27 12:25:36 -08:00 committed by James Valleroy
parent 224cbe51c5
commit b5273cccf7
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -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 '