fix(blog): Use LIMIT row_count OFFSET offset syntax instead of LIMIT offset, row_count

Reference: https://www.postgresql.org/docs/9.5/queries-limit.html
This commit is contained in:
Aditya Hase 2020-09-10 13:03:06 +05:30
parent f4a22683d5
commit 40c29158e5
No known key found for this signature in database
GPG key ID: 0A55F0FCA0234972

View file

@ -242,7 +242,7 @@ def get_blog_list(doctype, txt=None, filters=None, limit_start=0, limit_page_len
and t1.blogger = t2.name
%(condition)s
order by featured desc, published_on desc, name asc
limit %(start)s, %(page_len)s""" % {
limit %(page_len)s OFFSET %(start)s""" % {
"start": limit_start, "page_len": limit_page_length,
"condition": (" and " + " and ".join(conditions)) if conditions else ""
}