king-michael / simulation_database

Apache License 2.0
1 stars 1 forks source link

Bug: Viewer : Empty groups #32

Closed king-michael closed 5 years ago

king-michael commented 5 years ago

I get the bug

127.0.0.1 - - [22/Feb/2019 15:07:52] "GET /viewer/build_filter?selected_groups=&selected_keywords= HTTP/1.1" 500 
...
...
File "/home/micha/SIM-PhD-King/gits/simulation_database/simdb/dashboard/app/viewer/routes.py", line 45, in build_filter
    grp = api.get_all_groups(session, count=True)
  File "/home/micha/SIM-PhD-King/gits/simulation_database/simdb/databaseAPI.py", line 270, in get_all_groups
    if len(groups) == 0:
TypeError: object of type 'zip' has no len()
king-michael commented 5 years ago

in python3 : None cant be handled as bool

grp = None
if grp: 
  stuff()

It will still do stuff()

king-michael commented 5 years ago

closed