InsaLan/langate2000

AttributeError: 'NoneType' object has no attribute 'visible' when first launching the gate

Closed this issue · 0 comments

Due to the call :

File "./insalan-langate2000/langate/portal/views.py", line 22, in get_widgets
    "visible": RealtimeStatusWidget.objects.first().visible

When first launching the portal app, there is no RealtimeStatusWidget (nor PizzaWidget) object, so the call RealtimeStatusWidget.objects.first() returns None. We need to check if the object exists and if not we will need to create it beforehand.