Commit 2c83b805 authored by Aurélien Campéas's avatar Aurélien Campéas
Browse files

log: fix limit vs order issue

sql is such a fuss...
parent 7a40906739f0
......@@ -369,6 +369,9 @@ def test_changeset_metadata(engine, tsh):
meta = tsh.changeset_metadata(engine, log[0]['rev'])
assert meta == {'foo': 'A', 'bar': 42}
log = tsh.log(engine, names=['ts-cs-metadata'], limit=1)
assert len(log) == 1
def test_revision_date(engine, tsh):
for i in range(1, 5):
......
......@@ -503,9 +503,9 @@ class timeseries(SeriesServices):
if todate:
q.where('cset.insertion_date <= %(todate)s', todate=todate)
q.option('order by cset.id desc')
if limit:
q.option('limit %(limit)s', limit=limit)
q.option('order by cset.id desc')
rset = q.do(cn)
for csetid, author, revdate, meta in rset.fetchall():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment