diff options
| author | user <user@node5.net> | 2024-02-27 17:05:58 +0100 |
|---|---|---|
| committer | user <user@node5.net> | 2024-02-27 17:05:58 +0100 |
| commit | 4a8b1d18bf29f9b8036c89ff0b737a12c125a260 (patch) | |
| tree | 1d11120b6886696b9e4f52aec2af4686bd7e220b /src/blog_node5_net.py | |
| parent | 3ac4a73b2f633ab8b95a1174a438513dd4668f54 (diff) | |
comments fix contact never shown
Diffstat (limited to 'src/blog_node5_net.py')
| -rw-r--r-- | src/blog_node5_net.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/blog_node5_net.py b/src/blog_node5_net.py index cf5907e..b1d290b 100644 --- a/src/blog_node5_net.py +++ b/src/blog_node5_net.py @@ -40,7 +40,7 @@ def get_comments(url: str) -> list[dict]: with conn.cursor() as cur: cur.execute( "SELECT id, comment, page_url, visitor_url, username, " - "(CASE WHEN show_contact THEN contact ELSE NULL END), public, created_at " + "(CASE WHEN show_contact THEN contact ELSE NULL END) as contact, created_at " "FROM comment WHERE approved AND public AND page_url = %(url)s ORDER BY created_at DESC;", {'url': url}) comments = cur.fetchall() return comments |
