Skip to content

Commit 4739aa9

Browse files
author
Joey Jurjens
committed
Increase multi option performance by not doing a query if its already prefetched.
1 parent 64b2071 commit 4739aa9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

oscar_odin/mappings/catalogue.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def _attribute_value_to_native_type(item):
207207
return item.value.option
208208

209209
elif obj_type == item.attribute.MULTI_OPTION:
210-
return item.value.values_list("option", flat=True)
210+
return [value.option for value in item.value]
211211

212212
elif obj_type == item.attribute.FILE:
213213
return item.value.url

0 commit comments

Comments
 (0)