summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2012-01-20 14:12:32 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2012-01-20 14:12:55 (GMT)
commitc03861a19ce5eec878eb4c149f41da3503110aca (patch)
tree96410a537080922fcd0785d6e3e479e3bb6d777e
parent14f325d6caff097b887873cb9f7b06f8b317f147 (diff)
downloadtabellio.pcfdb-c03861a19ce5eec878eb4c149f41da3503110aca.zip
tabellio.pcfdb-c03861a19ce5eec878eb4c149f41da3503110aca.tar.gz
tabellio.pcfdb-c03861a19ce5eec878eb4c149f41da3503110aca.tar.bz2
also sync deputies on t_pers timestamp, not just t_pershistoline (#1232)
-rw-r--r--tabellio/pcfdb/sync.py3
1 files changed, 2 insertions, 1 deletions
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,