summaryrefslogtreecommitdiffstats
path: root/tabellio
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2011-11-03 13:08:28 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2011-11-03 13:08:28 (GMT)
commit65f06c3b45da1be302b985dfccc141067054ab4b (patch)
tree497b70f02c88f937ce1faa55d754f05f35c965be /tabellio
parent3cea0cf17b74f0b81af22c8b7fe82faae43f93e8 (diff)
downloadtabellio.pcfdb-65f06c3b45da1be302b985dfccc141067054ab4b.zip
tabellio.pcfdb-65f06c3b45da1be302b985dfccc141067054ab4b.tar.gz
tabellio.pcfdb-65f06c3b45da1be302b985dfccc141067054ab4b.tar.bz2
add import of document image id
Diffstat (limited to 'tabellio')
-rw-r--r--tabellio/pcfdb/sync.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tabellio/pcfdb/sync.py b/tabellio/pcfdb/sync.py
index f7a9788..490b1ab 100644
--- a/tabellio/pcfdb/sync.py
+++ b/tabellio/pcfdb/sync.py
@@ -573,7 +573,8 @@ class SyncFromPcfDbView(BrowserView):
where_ts = ''
if timestamp:
where_ts = cursor.mogrify('AND t_document.ts > %s', (timestamp,))
- cursor.execute('''SELECT t_document.id, type, sess, date, no, nodoc, intit, auteurs, matiereids, comppols
+ cursor.execute('''SELECT t_document.id, type, sess, date, no, nodoc,
+ intit, auteurs, matiereids, comppols, imageid
FROM t_document
JOIN t_typedoc
ON (t_document.type = t_typedoc.id)
@@ -586,7 +587,8 @@ class SyncFromPcfDbView(BrowserView):
row = cursor.fetchone()
if row is None:
break
- doc_id, doctype, sess, date, no, nodoc, intit, authors, subjects, polgroups = row
+ (doc_id, doctype, sess, date, no, nodoc, intit, authors, subjects,
+ polgroups, image_id) = row
if intit is None:
intit = {'RAPP': u'Rapport',
@@ -614,6 +616,7 @@ class SyncFromPcfDbView(BrowserView):
object.no = no
object.nodoc = nodoc
object.doctype = doctype
+ object.file_image_id = image_id
if authors:
authors = [self.get_author_intid(x) for x in authors]
object.authors = [RelationValue(x) for x in authors if x]