Spaces:
Running
Running
adds error treat
Browse files- app.py +2 -1
- index.html +1 -0
app.py
CHANGED
|
@@ -95,7 +95,8 @@ async def get_animal(animal_id: int):
|
|
| 95 |
return JSONResponse(content={"error": "not found"}, status_code=404)
|
| 96 |
for s in detail.get("sightings", []):
|
| 97 |
s["photo_url"] = _photo_url(s.get("photo_path") or "")
|
| 98 |
-
|
|
|
|
| 99 |
detail.get("animal", {}).pop("embedding", None)
|
| 100 |
return JSONResponse(content=detail)
|
| 101 |
|
|
|
|
| 95 |
return JSONResponse(content={"error": "not found"}, status_code=404)
|
| 96 |
for s in detail.get("sightings", []):
|
| 97 |
s["photo_url"] = _photo_url(s.get("photo_path") or "")
|
| 98 |
+
for h in detail.get("help_events", []):
|
| 99 |
+
h["photo_url"] = _photo_url(h.get("photo_path") or "")
|
| 100 |
detail.get("animal", {}).pop("embedding", None)
|
| 101 |
return JSONResponse(content=detail)
|
| 102 |
|
index.html
CHANGED
|
@@ -704,6 +704,7 @@
|
|
| 704 |
|
| 705 |
async function openProfile(id) {
|
| 706 |
profileAnimalId = id;
|
|
|
|
| 707 |
showScreen('profile');
|
| 708 |
|
| 709 |
// Reset
|
|
|
|
| 704 |
|
| 705 |
async function openProfile(id) {
|
| 706 |
profileAnimalId = id;
|
| 707 |
+
window.profileAnimalId = id;
|
| 708 |
showScreen('profile');
|
| 709 |
|
| 710 |
// Reset
|