Skip to content
  • Guillaume Tucker's avatar
    lava_results_app: fix exception when no action_metadata · 50a405a9
    Guillaume Tucker authored
    
    
    When a TestCase object has no action_metadata associated with it, the
    object attribute is None.  Check if this is the case before calling
    dict methods on it, to fix exceptions like this one:
    
      [...]
        File "/usr/lib/python3/dist-packages/lava_results_app/dbutils.py", line 352, in walk_actions
          build_action(action, testdata, submission)
        File "/usr/lib/python3/dist-packages/lava_results_app/dbutils.py", line 332, in build_action
          if 'level' in case.action_metadata:
      TypeError: argument of type 'NoneType' is not iterable
    
    Signed-off-by: default avatarGuillaume Tucker <guillaume.tucker@collabora.com>
    50a405a9