From 24a9683608e469b93abfd97a76f563b7c23261ce Mon Sep 17 00:00:00 2001 From: Michal Kunc Date: Fri, 19 Nov 2021 12:49:26 +0100 Subject: [PATCH] Filter out empty traits --- db_explorer/db_explorer/app.py | 1 + 1 file changed, 1 insertion(+) diff --git a/db_explorer/db_explorer/app.py b/db_explorer/db_explorer/app.py index 9bf181c..283c3ed 100644 --- a/db_explorer/db_explorer/app.py +++ b/db_explorer/db_explorer/app.py @@ -74,6 +74,7 @@ def show_action(name): item["_all_traits"].append(_traits.get("rarity", {}).get("value", "unkown rarity")) item["_all_traits"] += _traits.get("value", []) item["_all_traits"] += _traits.get("custom").split(',') + item["_all_traits"] = list(filter(lambda x: x != '', item["_all_traits"])) return render_template("action.html", action=item) if __name__ == "__main__":