diff --git a/app/hlds/parser.py b/app/hlds/parser.py index 5bd8036..854e766 100644 --- a/app/hlds/parser.py +++ b/app/hlds/parser.py @@ -45,7 +45,7 @@ class HldsSemanticActions: ast["id"], name=ast["name"], description=ast["description"], - price=ast["price"], + price=ast["price"] if ast["price"] else 0, tags=ast["tags"] if ast["tags"] else [], choices=ast["choices"], ) @@ -70,7 +70,7 @@ class HldsSemanticActions: ast["id"], name=ast["name"], description=ast["description"], - price=ast["price"], + price=ast["price"] if ast["price"] else 0, tags=ast["tags"], ) diff --git a/app/templates/location.html b/app/templates/location.html index 70e00e9..64b9020 100644 --- a/app/templates/location.html +++ b/app/templates/location.html @@ -7,9 +7,10 @@

{{ location.name }}

- {{ location.address }}
- {{ location.telephone }}
- {{ location.website }} + {% if location.address %} {{ location.address }}
{% endif %} + {% if location.telephone %}{{ location.telephone }}
{% endif %} + {% if location.website %} {{ location.website }}
{% endif %} + {% if location.osm %} {{ location.osm }}
{% endif %} {% if not current_user.is_anonymous() %} Create order {% endif %} @@ -28,10 +29,10 @@ NamePrice - {% for prod in location.products -%} + {% for dish in location.dishes -%} - {{ prod.name }} - {{ prod.price|euro }} + {{ dish.name }}{% if dish.description %} ({{dish.description}}){% endif %} + {{ dish.price|euro }} {%- endfor %} diff --git a/app/templates/locations.html b/app/templates/locations.html index 553442b..03d8c99 100644 --- a/app/templates/locations.html +++ b/app/templates/locations.html @@ -16,7 +16,7 @@ {{ loc.name }} {{ loc.address }} - + {{ loc.website }} {% if not current_user.is_anonymous() %} Create order