Python formatting

This commit is contained in:
Mouse Reeve 2021-10-02 16:56:23 -07:00
parent 43f0440505
commit 14ac8bb1b5

View file

@ -110,12 +110,12 @@ class Status(View):
) )
visible_thread = privacy_filter( visible_thread = privacy_filter(
request.user, request.user, models.Status.objects.filter(thread_id=status.thread_id)
models.Status.objects.filter(thread_id=status.thread_id)
).values_list("id", flat=True) ).values_list("id", flat=True)
visible_thread = list(visible_thread) 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 ( WITH RECURSIVE get_thread(depth, id, path) AS (
SELECT 1, st.id, ARRAY[st.id] SELECT 1, st.id, ARRAY[st.id]
@ -132,8 +132,9 @@ class Status(View):
) )
SELECT * FROM get_thread ORDER BY path; SELECT * FROM get_thread ORDER BY path;
""", params=[status.id, visible_thread, visible_thread]) """,
params=[status.id, visible_thread, visible_thread],
)
data = { data = {
**feed_page_data(request.user), **feed_page_data(request.user),