From e50ffb72a6cc43e3eb7811f22b900fe6f71e0292 Mon Sep 17 00:00:00 2001 From: feijooso Date: Wed, 3 Apr 2024 01:01:35 -0300 Subject: [PATCH] refactor --- app/service/Users.py | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/app/service/Users.py b/app/service/Users.py index 604d566..b219f17 100644 --- a/app/service/Users.py +++ b/app/service/Users.py @@ -81,21 +81,7 @@ def _get_user_info(self, access_token): def _validate_location(self, location): if "lat" in location and "long" in location: - latitud = location["lat"] - longitud = location["long"] + if (-90<=location["lat"]<= 90 and -180<=location["long"]<= 180): return True + return False - if (-90<=location["lat"]<= 90 and -180<=location["long"]<= 180): - return True - - return False - -""" if isinstance(latitud, (int, float)) and isinstance(longitud, (int, float)): - if -90 <= latitud <= 90 and -90 <= longitud <= 90: - return True - else: - return False - else: - return False - else: - return False """