Skip to content

Commit a9431e7

Browse files
committed
Note related-posts library-scoping intent
related_qs was meant to filter by libraries linked to the current entry, not "any other published post." That relation doesn't exist in the schema yet, so a TODO captures the intent until it does.
1 parent 70a710f commit a9431e7

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

news/views.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,10 @@ def get_v3_context_data(self, **kwargs):
258258
.order_by("publish_at", "pk")
259259
.first()
260260
)
261+
# TODO: once Entry has a relation to libraries, scope related
262+
# posts to those linked to the libraries referenced by this
263+
# entry. Falls back to "any other published post" until that
264+
# relation exists.
261265
related_qs = (
262266
Entry.objects.published()
263267
.select_related("author")

0 commit comments

Comments
 (0)