Spaces:
Sleeping
Sleeping
eliminar modulo que no se utiliza
Browse files- app/utils/validations.py +0 -21
app/utils/validations.py
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
# BORRAR ESTE MODULO:
|
2 |
-
from fastapi import HTTPException
|
3 |
-
|
4 |
-
|
5 |
-
def check_country_code(request):
|
6 |
-
if request.country not in ["CL", "MX"]:
|
7 |
-
raise HTTPException(
|
8 |
-
status_code=400, detail=f"Invalid country code: {request.country}"
|
9 |
-
)
|
10 |
-
else:
|
11 |
-
return print("correct country code")
|
12 |
-
|
13 |
-
|
14 |
-
def check_valid_ids(request, df):
|
15 |
-
invalid_ids = set(request.invoiceId) - set(df.index)
|
16 |
-
if invalid_ids:
|
17 |
-
raise HTTPException(
|
18 |
-
status_code=400, detail=f"Invalid invoiceId(s): {invalid_ids}"
|
19 |
-
)
|
20 |
-
else:
|
21 |
-
return print("invoice ids are valid")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|