summaryrefslogtreecommitdiffstats
path: root/tabellio/pcfdb/sync.py
diff options
context:
space:
mode:
Diffstat (limited to 'tabellio/pcfdb/sync.py')
-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()