summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2011-11-11 20:44:08 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2011-11-11 20:44:08 (GMT)
commit88980d403d24bf7be0c635c18c5c755dfbb24bb1 (patch)
treee1445d9efd594e8cdc9fd617f01f7708a443098a
parent8be673cd567392d4424f0a51227b7d74d656f93a (diff)
downloadtabellio.pcfdb-88980d403d24bf7be0c635c18c5c755dfbb24bb1.zip
tabellio.pcfdb-88980d403d24bf7be0c635c18c5c755dfbb24bb1.tar.gz
tabellio.pcfdb-88980d403d24bf7be0c635c18c5c755dfbb24bb1.tar.bz2
invert logic of thesaurus row exclusion
-rw-r--r--tabellio/pcfdb/sync.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tabellio/pcfdb/sync.py b/tabellio/pcfdb/sync.py
index 366667a..9589c41 100644
--- a/tabellio/pcfdb/sync.py
+++ b/tabellio/pcfdb/sync.py
@@ -387,10 +387,10 @@ class SyncFromPcfDbView(BrowserView):
cursor.execute('''SELECT t_thesaurus_term.id, t_thesaurus_term.term
FROM t_thesaurus_term
- WHERE NOT EXISTS (
+ WHERE EXISTS (
SELECT * FROM t_thesaurus_rel
WHERE sectermid = t_thesaurus_term.id
- AND t_thesaurus_rel.rel in ('HN', 'SN'))''')
+ AND rel not in ('HN', 'SN'))''')
terms = []
while True:
row = cursor.fetchone()