Scouterna / skojjt

Närvarorapportering för scouter
Apache License 2.0
14 stars 15 forks source link

Problem efter byte av termin #147

Closed TobbeEdgeware closed 2 years ago

TobbeEdgeware commented 3 years ago

Märkesutvidgningen verkar ha lagt till en svaghet i systemet och det kraschade när jag försökte använda det efter att ha bytt till HT-2021, se traceback nedan.

Det hela verkar vara ett problem med att det inte några avdelningar definierade i en ny termin så om man importerar data för en kår fungerar det igen.

Jag har inte kvar felet, men tänkte ändå göra en patch för att undvika att det händer igen.

Traceback (most recent call last):
  File "/base/alloc/tmpfs/dynamic_runtimes/python27g/46417889d06c4c16/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 271, in Handle
    result = handler(dict(self._environ), self._StartResponse)
  File "/base/data/home/apps/e~stg-skojjt/20210601t230842.435558480903488065/lib/flask/app.py", line 2334, in __call__
    return self.wsgi_app(environ, start_response)
  File "/base/data/home/apps/e~stg-skojjt/20210601t230842.435558480903488065/lib/flask/app.py", line 2320, in wsgi_app
    response = self.handle_exception(e)
  File "/base/data/home/apps/e~stg-skojjt/20210601t230842.435558480903488065/lib/flask/app.py", line 1766, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/base/data/home/apps/e~stg-skojjt/20210601t230842.435558480903488065/lib/flask/app.py", line 2317, in wsgi_app
    response = self.full_dispatch_request()
  File "/base/data/home/apps/e~stg-skojjt/20210601t230842.435558480903488065/lib/flask/app.py", line 1840, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/base/data/home/apps/e~stg-skojjt/20210601t230842.435558480903488065/lib/flask/app.py", line 1743, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/base/data/home/apps/e~stg-skojjt/20210601t230842.435558480903488065/lib/flask/app.py", line 1838, in full_dispatch_request
    rv = self.dispatch_request()
  File "/base/data/home/apps/e~stg-skojjt/20210601t230842.435558480903488065/lib/flask/app.py", line 1824, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/base/data/home/apps/e~stg-skojjt/20210601t230842.435558480903488065/start.py", line 304, in show
    nr_badge_cols = max(5, *[len(tb) for tb in troops_badges])
TypeError: 'int' object is not iterable
tobbee commented 2 years ago

Ska vara löst av PR #149