8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-05 01:16:27 +00:00

Merge branch '220-do-not-fail-when-no-gtu' into 'dev'

Resolve "Do not fail when no GTU has been uploaded."

See merge request federez/re2o!440
This commit is contained in:
chirac 2019-09-20 14:23:18 +02:00
commit 347cd8bf5d

View file

@ -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 <a href='%s' download='CGU'>%s</a>." % (
_("I commit to accept the"),
GeneralOption.get_cached_value('GTU').url,
gtu_file.url if gtu_file else "#",
_("General Terms of Use")
)
)