sunilchm commited on
Commit
d76c6fc
·
1 Parent(s): e1f1397

print long and lan

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -226,6 +226,7 @@ async def upload_image(
226
  await file.seek(0)
227
  lat, lon = get_gps_location(file.file)
228
  location_point = f"Point({lon:.6f} {lat:.6f})" if lat and lon else None
 
229
  guid = str(uuid.uuid4())
230
  variance_levels = ["Low", "Mid", "High"]
231
  getvariancevalue = random.choice(variance_levels) if category == "potholes" else None
@@ -238,7 +239,7 @@ async def upload_image(
238
  "image_name": file.filename,
239
  "image_url": url,
240
  "location": location_point,
241
- "location_text": location_point or location or None,
242
  "status": "In Progress",
243
  "category": category,
244
  "approved": is_approved,
 
226
  await file.seek(0)
227
  lat, lon = get_gps_location(file.file)
228
  location_point = f"Point({lon:.6f} {lat:.6f})" if lat and lon else None
229
+ location = f"{lon:.6f} {lat:.6f}" if lat and lon else location
230
  guid = str(uuid.uuid4())
231
  variance_levels = ["Low", "Mid", "High"]
232
  getvariancevalue = random.choice(variance_levels) if category == "potholes" else None
 
239
  "image_name": file.filename,
240
  "image_url": url,
241
  "location": location_point,
242
+ "location_text": location or None,
243
  "status": "In Progress",
244
  "category": category,
245
  "approved": is_approved,