context_processors: prevent a null station error when no default station is defined

This commit is contained in:
2023-11-24 08:43:34 +01:00
parent 3c34ca88e2
commit 20adbbacf1

View File

@ -1,3 +1,4 @@
def station(request):
station = request.station
return {"station": station, "audio_streams": station.streams}
audio_streams = station.streams if station else None
return {"station": station, "audio_streams": audio_streams}