Add order for shelf books to satisfy warning

I believe this will sort books by order they were added to the shelf,
which seems reasonable. Should add some tests to make sure though.
This commit is contained in:
Joel Bradshaw
2021-01-13 23:44:44 -08:00
parent 8986af42d6
commit b0ea31f2a9
2 changed files with 4 additions and 1 deletions

View File

@ -281,4 +281,6 @@ class OrderedCollectionMixin(OrderedCollectionPageMixin):
def to_activity(self, **kwargs):
''' an ordered collection of the specified model queryset '''
if not self.collection_queryset.ordered:
raise RuntimeError('collection_queryset must be ordered')
return self.to_ordered_collection(self.collection_queryset, **kwargs)