From b6740252596e971a89507f1a8742a223325c561f Mon Sep 17 00:00:00 2001 From: Hugo Levy-Falk Date: Fri, 20 Sep 2019 11:57:57 +0200 Subject: [PATCH 1/3] Fix #220 --- users/forms.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/users/forms.py b/users/forms.py index 747b4aff..d29d0bdd 100644 --- a/users/forms.py +++ b/users/forms.py @@ -409,10 +409,11 @@ class AdherentCreationForm(AdherentForm): def __init__(self, *args, **kwargs): super(AdherentCreationForm, self).__init__(*args, **kwargs) + gtu_file = GeneralOption.get_cached_value('GTU') self.fields['gtu_check'].label = mark_safe( - "%s %s." % ( + "%s %s." % ( _("I commit to accept the"), - GeneralOption.get_cached_value('GTU').url, + gtu_file.url if gtu_file else "https://en.wikipedia.org/wiki/Llama", _("General Terms of Use") ) ) From aee410508d75f1c17052279cd374be0a482cc39d Mon Sep 17 00:00:00 2001 From: Hugo Levy-Falk Date: Fri, 20 Sep 2019 11:57:57 +0200 Subject: [PATCH 2/3] Fix #220 --- users/forms.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/users/forms.py b/users/forms.py index 747b4aff..d29d0bdd 100644 --- a/users/forms.py +++ b/users/forms.py @@ -409,10 +409,11 @@ class AdherentCreationForm(AdherentForm): def __init__(self, *args, **kwargs): super(AdherentCreationForm, self).__init__(*args, **kwargs) + gtu_file = GeneralOption.get_cached_value('GTU') self.fields['gtu_check'].label = mark_safe( - "%s %s." % ( + "%s %s." % ( _("I commit to accept the"), - GeneralOption.get_cached_value('GTU').url, + gtu_file.url if gtu_file else "https://en.wikipedia.org/wiki/Llama", _("General Terms of Use") ) ) From d9f5514b585a1de9e152f0974378319fb49a8029 Mon Sep 17 00:00:00 2001 From: Hugo Levy-Falk Date: Fri, 20 Sep 2019 14:20:42 +0200 Subject: [PATCH 3/3] Llamas are being oppressed. --- users/forms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/users/forms.py b/users/forms.py index d29d0bdd..33100c9d 100644 --- a/users/forms.py +++ b/users/forms.py @@ -411,9 +411,9 @@ class AdherentCreationForm(AdherentForm): super(AdherentCreationForm, self).__init__(*args, **kwargs) gtu_file = GeneralOption.get_cached_value('GTU') self.fields['gtu_check'].label = mark_safe( - "%s %s." % ( + "%s %s." % ( _("I commit to accept the"), - gtu_file.url if gtu_file else "https://en.wikipedia.org/wiki/Llama", + gtu_file.url if gtu_file else "#", _("General Terms of Use") ) )