From c03861a19ce5eec878eb4c149f41da3503110aca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 20 Jan 2012 15:12:32 +0100 Subject: [PATCH] also sync deputies on t_pers timestamp, not just t_pershistoline (#1232) --- tabellio/pcfdb/sync.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tabellio/pcfdb/sync.py b/tabellio/pcfdb/sync.py index 0334de2..0018560 100644 --- a/tabellio/pcfdb/sync.py +++ b/tabellio/pcfdb/sync.py @@ -434,7 +434,8 @@ class SyncFromPcfDbView(BrowserView): cursor = self.db_connection.cursor() where_ts = '' if timestamp: - where_ts = cursor.mogrify('AND t_pershistoline.ts > %s', (timestamp,)) + where_ts = cursor.mogrify('AND (t_pershistoline.ts > %s + OR t_pers.ts > %s)', (timestamp, timestamp)) # previous deputies cursor.execute('''SELECT t_pers.id, t_pers.nom, prenom, sexe, datenaiss,