Tests tag page and orders tag collection json

This commit is contained in:
Mouse Reeve
2020-12-31 08:05:24 -08:00
parent d04a1956f5
commit 29ee027f6d
3 changed files with 44 additions and 2 deletions

View File

@ -129,7 +129,7 @@ class Work(OrderedCollectionPageMixin, Book):
def to_edition_list(self, **kwargs):
''' an ordered collection of editions '''
return self.to_ordered_collection(
self.editions.all(),
self.editions.order_by('-updated_date').all(),
remote_id='%s/editions' % self.remote_id,
**kwargs
)

View File

@ -17,7 +17,9 @@ class Tag(OrderedCollectionMixin, BookWyrmModel):
@classmethod
def book_queryset(cls, identifier):
''' county of books associated with this tag '''
return cls.objects.filter(identifier=identifier)
return cls.objects.filter(
identifier=identifier
).order_by('-updated_date')
@property
def collection_queryset(self):