also check timestamp from t_histoline, not just t_histo (#1224)
This commit is contained in:
parent
341db07cc2
commit
f4c476e716
|
@ -951,9 +951,10 @@ class SyncFromPcfDbView(BrowserView):
|
|||
|
||||
where_ts = ''
|
||||
if timestamp:
|
||||
where_ts = cursor.mogrify('''AND EXISTS (SELECT ts FROM t_histoline
|
||||
where_ts = cursor.mogrify('''AND (EXISTS (SELECT ts FROM t_histoline
|
||||
WHERE idhisto = t_histo.id
|
||||
AND ts > %s)''', (timestamp,))
|
||||
AND ts > %s)
|
||||
OR t_histo.ts > %s)''', (timestamp, timestamp))
|
||||
|
||||
### Handle t_dossiers
|
||||
cursor.execute('''SELECT t_histo.id, t_histo.st, t_histo.type,
|
||||
|
@ -1023,9 +1024,10 @@ class SyncFromPcfDbView(BrowserView):
|
|||
### Handle t_qx
|
||||
where_ts = ''
|
||||
if timestamp:
|
||||
where_ts = cursor.mogrify('''AND EXISTS (SELECT ts FROM t_histoline
|
||||
where_ts = cursor.mogrify('''AND (EXISTS (SELECT ts FROM t_histoline
|
||||
WHERE idhisto = t_histo.id
|
||||
AND ts > %s)''', (timestamp,))
|
||||
AND ts > %s)
|
||||
OR t_histo.ts > %s)''', (timestamp, timestamp))
|
||||
|
||||
cursor.execute('''SELECT t_histo.id, t_histo.st, t_histo.type, t_histo.sess,
|
||||
t_histo.no, t_histo.intit, t_histo.auteurs,
|
||||
|
|
Reference in New Issue