Skip to content

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

Use dataloader instead of prefetch_related_objects

Ania Warzecha4aaf198d5438
diff --git a/saleor/graphql/page/dataloaders.py b/saleor/graphql/page/dataloaders.py
index ecb31fbd8c..06651079f3 100644
--- a/saleor/graphql/page/dataloaders.py
+++ b/saleor/graphql/page/dataloaders.py
@@ -123,7 +123,7 @@ class AttributeValuesByPageIdLoader(DataLoader):
values = [
value
for value in page_values
- if value.attribute_id == attribute.id
+ if value and value.attribute_id == attribute.id
]
assigned_page_map[page.id].append(
{