From cdd7aa275e93eb63ebfe3b5327c401802bb914b4 Mon Sep 17 00:00:00 2001
From: Bjarke Madsen <bjarke@nordu.net>
Date: Tue, 1 Aug 2023 18:08:44 +0200
Subject: [PATCH] Fix flake8 errors that only show up in release process..

---
 compendium_v2/conversion/conversion.py | 2 +-
 compendium_v2/routes/survey.py         | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/compendium_v2/conversion/conversion.py b/compendium_v2/conversion/conversion.py
index d400f128..f28b69fd 100644
--- a/compendium_v2/conversion/conversion.py
+++ b/compendium_v2/conversion/conversion.py
@@ -76,7 +76,7 @@ def convert_answers(answers):
             else:
                 subdict = subdict.setdefault(name, {})
 
-        if type(subdict) == list:  # special case where json list is mapped to a list of dicts (part 2)
+        if isinstance(subdict, list):  # special case where json list is mapped to a list of dicts (part 2)
             for answer_entry in answer:
                 subdict.append({question_names[-1]: answer_entry})
         elif question_names[-1] == "available":  # special case because we changed the policies questions a bit
diff --git a/compendium_v2/routes/survey.py b/compendium_v2/routes/survey.py
index bd2c6293..898a6b9e 100644
--- a/compendium_v2/routes/survey.py
+++ b/compendium_v2/routes/survey.py
@@ -287,9 +287,9 @@ def inspect_survey(year) -> Any:
 
     def visible_visitor(object, items):
         for key, value in items:
-            if type(value) == dict:
+            if isinstance(value, dict):
                 visible_visitor(value, value.items())
-            elif type(value) == list:
+            elif isinstance(value, list):
                 visible_visitor(value, enumerate(value))
             elif key == 'visibleIf':
                 object['title'] = object['title'] + ' (visibleif: [' + value.replace('{', '#').replace('}', '#') + '])'
-- 
GitLab