Skip to content

Commit

Permalink
fixed refi project export (missing sources)
Browse files Browse the repository at this point in the history
  • Loading branch information
ccbogel authored May 8, 2023
1 parent add161e commit 2ac5c68
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions qualcoder/refi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2448,8 +2448,8 @@ def sources_xml(self):
for s in self.sources:
guid = self.create_guid()
# Text document
if (s['mediapath'] is None and (s['name'][-4:].lower() != '.pdf' and s['name'][-12:] != '.transcribed')) or \
(s['mediapath'] is not None and s['mediapath'][0:5] == 'docs:' and (
if ((s['mediapath'] is None) and (s['name'][-4:].lower() != '.pdf' and s['name'][-12:] != '.transcribed')) or \
(s['mediapath'] is not None and s['mediapath'][0:6] == '/docs/' and (
s['name'][-4:].lower() != '.pdf' or s['name'][-12:] != '.transcribed')):
xml += '<TextSource '
if s['external'] is None:
Expand Down Expand Up @@ -2973,7 +2973,7 @@ def get_sources(self):

self.sources = []
cur = self.app.conn.cursor()
cur.execute("SELECT id, name, fulltext, mediapath, memo, owner, date FROM source")
cur.execute("SELECT id, name, fulltext, mediapath, ifnull(memo,''), owner, date FROM source")
results = cur.fetchall()
for r in results:
guid = self.create_guid()
Expand Down

0 comments on commit 2ac5c68

Please sign in to comment.