Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix tests

Pacu27eeec6280147
diff --git a/saleor/core/templatetags/shop.py b/saleor/core/templatetags/shop.py
index 179b31d0d1..93705dc686 100644
--- a/saleor/core/templatetags/shop.py
+++ b/saleor/core/templatetags/shop.py
@@ -21,4 +21,5 @@ def get_sort_by_url(context, field, descending=False):
def menu(context, slug, horizontal=False):
menus = context[NAVIGATION_CONTEXT_NAME]
menu = next((menu for menu in menus if menu.slug == slug), None)
- return {'menu_items': menu.items.all(), 'horizontal': horizontal}
+ menu_items = menu.items.all() if menu else None
+ return {'menu_items': menu_items, 'horizontal': horizontal}
diff --git a/templates/dashboard/product/product_attribute/detail.html b/templates/dashboard/product/product_attribute/detail.html
index 74f54e46b3..ca3741f88d 100644
--- a/templates/dashboard/product/product_attribute/detail.html
+++ b/templates/dashboard/product/product_attribute/detail.html
@@ -79,7 +79,7 @@
</tr>
</thead>
<tbody>
- {% for value in attribute.values %}
+ {% for value in attribute.values.all %}
<tr>
<td>
{{ value.name }}