diff --git a/src/wuttafarm/web/util.py b/src/wuttafarm/web/util.py index 35a6f02..ec88525 100644 --- a/src/wuttafarm/web/util.py +++ b/src/wuttafarm/web/util.py @@ -81,7 +81,9 @@ def render_quantity_object(quantity): text = f"( {measure} ) {value} {unit}" if quantity["quantity_type_id"] == "material": - materials = ", ".join([mtype["name"] for mtype in quantity["material_types"]]) + materials = ", ".join( + [mtype.get("name", "???") for mtype in quantity["material_types"]] + ) return f"{materials} {text}" return text