mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-23 10:01:04 +00:00
Python formatting
This commit is contained in:
parent
43f0440505
commit
14ac8bb1b5
1 changed files with 6 additions and 5 deletions
|
@ -110,12 +110,12 @@ class Status(View):
|
|||
)
|
||||
|
||||
visible_thread = privacy_filter(
|
||||
request.user,
|
||||
models.Status.objects.filter(thread_id=status.thread_id)
|
||||
request.user, models.Status.objects.filter(thread_id=status.thread_id)
|
||||
).values_list("id", flat=True)
|
||||
visible_thread = list(visible_thread)
|
||||
|
||||
children = models.Status.objects.select_subclasses().raw("""
|
||||
children = models.Status.objects.select_subclasses().raw(
|
||||
"""
|
||||
WITH RECURSIVE get_thread(depth, id, path) AS (
|
||||
|
||||
SELECT 1, st.id, ARRAY[st.id]
|
||||
|
@ -132,8 +132,9 @@ class Status(View):
|
|||
)
|
||||
|
||||
SELECT * FROM get_thread ORDER BY path;
|
||||
""", params=[status.id, visible_thread, visible_thread])
|
||||
|
||||
""",
|
||||
params=[status.id, visible_thread, visible_thread],
|
||||
)
|
||||
|
||||
data = {
|
||||
**feed_page_data(request.user),
|
||||
|
|
Loading…
Reference in a new issue