aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2022-07-24 21:20:01 +0200
committerDaniel Schadt <kingdread@gmx.de>2022-07-24 21:20:01 +0200
commit432a531224e2b36e4ce111c91150143436589f74 (patch)
tree9dc41cd38212b809543af10f319e4c89f4983ac6
parent18fdfcbb815f0ff72102f03d5372f41f19f5b21d (diff)
downloadfietsboek-432a531224e2b36e4ce111c91150143436589f74.tar.gz
fietsboek-432a531224e2b36e4ce111c91150143436589f74.tar.bz2
fietsboek-432a531224e2b36e4ce111c91150143436589f74.zip
fix images not showing when using the share link
-rw-r--r--fietsboek/views/detail.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/fietsboek/views/detail.py b/fietsboek/views/detail.py
index 1808bda..f213231 100644
--- a/fietsboek/views/detail.py
+++ b/fietsboek/views/detail.py
@@ -27,7 +27,10 @@ def details(request):
images = []
for image_name in request.data_manager.images(track.id):
- img_src = request.route_url("image", track_id=track.id, image_name=image_name)
+ query = []
+ if 'secret' in request.GET:
+ query.append(('secret', request.GET['secret']))
+ img_src = request.route_url("image", track_id=track.id, image_name=image_name, _query=query)
query = select(models.ImageMetadata).filter_by(track=track, image_name=image_name)
image_metadata = request.dbsession.execute(query).scalar_one_or_none()
if image_metadata: