X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/5a1de03a12a386e83a5c579fefd8e6ffbedc2794..d71968e15d1f77dc04908f30237e37163d54efde:/apps/api/handlers/library_handlers.py?ds=sidebyside diff --git a/apps/api/handlers/library_handlers.py b/apps/api/handlers/library_handlers.py index b30f2e78..5696cc95 100644 --- a/apps/api/handlers/library_handlers.py +++ b/apps/api/handlers/library_handlers.py @@ -268,13 +268,15 @@ class DocumentTextHandler(BaseHandler): f.write(json.dumps(includes)) f.close() + lib._fileadd(resolve('parts')) + # update the parts cache PartCache.update_cache(docid, current.owner,\ stored_includes, includes) # now that the parts are ok, write xml f = lib._fileopen(resolve('xml'), 'w+') - f.write(data) + f.write(data.encode('utf-8')) f.close() ndoc = None @@ -438,4 +440,4 @@ class MergeHandler(BaseHandler): "parent_user_resivion": udoc.revision, "parent_revision": doc.revision, "revision": udoc.revision, - }) \ No newline at end of file + })