From 432a531224e2b36e4ce111c91150143436589f74 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Sun, 24 Jul 2022 21:20:01 +0200 Subject: fix images not showing when using the share link --- fietsboek/views/detail.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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: -- cgit v1.2.3