Skip to content

Commit 4f3eb5a

Browse files
committed
Bugfix for new ChatMap version
1 parent 3f21729 commit 4f3eb5a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/hotumap/chatmap.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,9 @@ def create_map(geojson_data, geojson_file_name, center, map_name, files, owner,
178178
# If no media, or no image, set a blank single pixel
179179
site_url_media = SITE_URL.replace("http:", "").replace("https:", "")
180180
for feature in geojson_data['features']:
181-
path = f"{uuid}-{feature['properties'].get('file')}"
182-
if path:
181+
file_name = feature['properties'].get('file')
182+
if file_name:
183+
path = f"{uuid}-{file_name}"
183184
if path.endswith(".jpg"):
184185
feature['properties']['image'] = f"{SITE_URL}/media_file/{path}"
185186
elif path.endswith(".mp4"):

0 commit comments

Comments
 (0)