From 7e83879c962dad79a1c4c57560d09d4568eb89e0 Mon Sep 17 00:00:00 2001
From: sanj <67624670+iodrift@users.noreply.github.com>
Date: Thu, 1 Aug 2024 23:53:07 -0700
Subject: [PATCH] Auto-update: Thu Aug  1 23:53:07 PDT 2024

---
 sijapi/classes.py     | 1 -
 sijapi/routers/gis.py | 3 ++-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sijapi/classes.py b/sijapi/classes.py
index ed7e5fd..6098ce6 100644
--- a/sijapi/classes.py
+++ b/sijapi/classes.py
@@ -1176,7 +1176,6 @@ class Location(BaseModel):
         }
         populate_by_name = True
 
-
 class Geocoder:
     def __init__(self, named_locs: Union[str, Path] = None, cache_file: Union[str, Path] = 'timezone_cache.json'):
         self.tf = TimezoneFinder()
diff --git a/sijapi/routers/gis.py b/sijapi/routers/gis.py
index e7b91e8..d00ce14 100644
--- a/sijapi/routers/gis.py
+++ b/sijapi/routers/gis.py
@@ -528,12 +528,13 @@ async def post_locate_endpoint(locations: Union[Location, List[Location]]):
     return {"message": "Locations and weather updated", "results": responses}
 
 
+
 @gis.get("/locate", response_model=Location)
 async def get_last_location_endpoint() -> JSONResponse:
     this_location = await get_last_location()
 
     if this_location:
-        location_dict = this_location.model_dump()
+        location_dict = this_location.model_dump(mode='json')
         return JSONResponse(content=location_dict)
     else:
         raise HTTPException(status_code=404, detail="No location found before the specified datetime")