Verified Commit 899ba311 authored by Agate's avatar Agate 💬

Do not fail on library page scan if one item is invalid

parent 852bed6f
......@@ -616,10 +616,12 @@ class CollectionPageSerializer(serializers.Serializer):
if not item_serializer:
return v
raw_items = [item_serializer(data=i, context=self.context) for i in v]
valid_items = []
for i in raw_items:
i.is_valid(raise_exception=True)
if i.is_valid():
valid_items.append(i)
return raw_items
return valid_items
def to_representation(self, conf):
page = conf['page']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment