Skip to content

Commit

Permalink
Merge pull request #1906 from NYPL-Simplified/develop
Browse files Browse the repository at this point in the history
Deploy Develop to QA
  • Loading branch information
keithbauer authored Aug 15, 2023
2 parents e6edef5 + 662cc7e commit 62d2a16
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/opds.py
Original file line number Diff line number Diff line change
Expand Up @@ -1029,13 +1029,15 @@ def make_link(ep):
for facet in all_order_facets:
order = dict(parse_qsl(facet["href"])).get('order')
if order in enabled_order_facets:
facets.order = order
if order == original_facet:
facet = cls.facet_link(href=facet["href"], title=facet["title"], facet_group_name="Sort by", is_active=True)
else:
facet = cls.facet_link(href=facet["href"], title=facet["title"], facet_group_name="Sort by", is_active=False)
# cls.facet_links generates a /feed/ url, but we want to use
# search_url to generate a /search/ url. We also want to generate
# the facet url for this given ordering facet instead of the original facet.
facets.order = order
facet["href"] = annotator.search_url(lane, query, pagination=None, facets=facets)
if order == original_facet:
facet["href"] += "&active=true"
AcquisitionFeed.add_link_to_feed(feed=opds_feed.feed, **facet)
facets.order = original_facet

Expand Down

0 comments on commit 62d2a16

Please sign in to comment.