errors handling
This commit is contained in:
parent
709e756e6a
commit
3423efac09
3 changed files with 17 additions and 1 deletions
4
menus.py
4
menus.py
|
@ -115,6 +115,10 @@ class MenuMessageFormatter:
|
|||
self.env = env
|
||||
|
||||
def create_message(self, menus: Menus, menu_type: str) -> str:
|
||||
if menus is None:
|
||||
template = self.env.get_template("menu-erreur.txt")
|
||||
return template.render()
|
||||
|
||||
days = menus.days
|
||||
if menu_type.lower() == "introduction":
|
||||
menu = menus.introduction
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue