Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -510,7 +510,16 @@ def create_app(language='en'):
|
|
| 510 |
if isinstance(day_blob.get("interactions", {}), dict)
|
| 511 |
else {}
|
| 512 |
)
|
| 513 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 514 |
|
| 515 |
def _inc_interactions_today(uid: str):
|
| 516 |
data = _load_call_log()
|
|
|
|
| 510 |
if isinstance(day_blob.get("interactions", {}), dict)
|
| 511 |
else {}
|
| 512 |
)
|
| 513 |
+
val = inter.get(uid, 0)
|
| 514 |
+
# Validar tipo antes de convertir
|
| 515 |
+
if isinstance(val, (str, int, float)):
|
| 516 |
+
try:
|
| 517 |
+
return int(val)
|
| 518 |
+
except Exception:
|
| 519 |
+
return 0
|
| 520 |
+
else:
|
| 521 |
+
return 0
|
| 522 |
+
|
| 523 |
|
| 524 |
def _inc_interactions_today(uid: str):
|
| 525 |
data = _load_call_log()
|