diff --git a/sijapi/classes.py b/sijapi/classes.py index e572c6c..14f7e21 100644 --- a/sijapi/classes.py +++ b/sijapi/classes.py @@ -109,8 +109,6 @@ class IncomingEmail(BaseModel): - - class Location(BaseModel): latitude: float longitude: float diff --git a/sijapi/routers/note.py b/sijapi/routers/note.py index afd2d76..318faf9 100644 --- a/sijapi/routers/note.py +++ b/sijapi/routers/note.py @@ -667,7 +667,7 @@ async def generate_banner(dt, location: Location = None, forecast: str = None, m if location.display_name: display_name += f"{location.display_name}" - else: + elif: display_name += f"{location.road}, " if location.road else "" display_name += f"the {location.neighbourhood} neighbourhood of " if location.neighbourhood else "" display_name += f"the {location.suburb} suburb of " if location.suburb else ""