Filter out empty traits

This commit is contained in:
Michal Kunc 2021-11-19 12:49:26 +01:00
parent c7d484fa9a
commit 24a9683608
Signed by: michal
GPG Key ID: 4CA5FB6559E0BDF8

View File

@ -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__":