feat: Added edit profile func

This commit is contained in:
ITQ
2024-03-20 23:12:35 +03:00
parent 3ca80dea1f
commit 2d35f26b29
6 changed files with 197 additions and 7 deletions
+14 -6
View File
@@ -23,9 +23,13 @@ def validate_country(country: str):
if not geocode:
return False, None
is_loc_country = geocode.raw.get(
"type", None,
) == "administrative"
is_loc_country = (
geocode.raw.get(
"type",
None,
)
== "administrative"
)
if is_loc_country:
normalized_country = geocode.raw.get("name", "Invalid country")
@@ -55,9 +59,13 @@ def validate_city(city: str, country: str):
if not geocode:
return False, None
check_in_valid = geocode.raw.get(
"type", None,
) in valid_list
check_in_valid = (
geocode.raw.get(
"type",
None,
)
in valid_list
)
if geocode and check_in_valid:
normalized_country = geocode.raw.get("name", "Invalid city")
+3 -1
View File
@@ -12,4 +12,6 @@ class RegistrationForm(StatesGroup):
class UserAltering(StatesGroup):
new_value = State()
message_id = State()
column = State()
value = State()