Affichage fct bonus si pas configurée
This commit is contained in:
parent
bc4cd63ea8
commit
5a270945e9
@ -264,11 +264,15 @@ def get_bonus_description(bonus_name: str):
|
||||
bonus_name = ""
|
||||
bonus_class = ScoDocSiteConfig.get_bonus_sport_class_from_name(bonus_name)
|
||||
text = bonus_class.__doc__
|
||||
if text:
|
||||
fields = re.split(r"\n\n", text, maxsplit=1)
|
||||
if len(fields) > 1:
|
||||
first_line, text = fields
|
||||
else:
|
||||
first_line, text = "", fields[0]
|
||||
else:
|
||||
text = ""
|
||||
first_line = "pas de fonction bonus configurée."
|
||||
|
||||
return f"""<div class="bonus_description_head">{first_line}</div>
|
||||
<div>{text}</div>
|
||||
|
Loading…
Reference in New Issue
Block a user