Skip to content

Commit c556820

Browse files
committed
Fixed a server 500 on missing flooplan image file, which should have returned a 404.
- Legacy-Id: 17689
1 parent 8a7f4ce commit c556820

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

ietf/meeting/views.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2335,6 +2335,11 @@ def floor_plan(request, num=None, floor=None, ):
23352335
floors = FloorPlan.objects.filter(meeting=meeting).order_by('order')
23362336
if floor:
23372337
floors = [ f for f in floors if xslugify(f.name) == floor ]
2338+
for floor in floors:
2339+
try:
2340+
floor.image.width
2341+
except FileNotFoundError:
2342+
raise Http404('Missing floorplan image for %s' % floor)
23382343
return render(request, 'meeting/floor-plan.html', {
23392344
"schedule": schedule,
23402345
"number": num,

0 commit comments

Comments
 (0)