jp (pubsub, common): fixed last item edition (keep item id instead of creating a new one)

This commit is contained in:
Goffi 2017-06-28 20:28:24 +02:00
commit 364130bcbe

View file

@ -336,8 +336,6 @@ class Edit(base.CommandBase, BlogCommon, common.BaseEdit):
def edit(self, content_file_path, content_file_obj,
mb_data=None):
"""Edit the file contening the content using editor, and publish it"""
if mb_data is not None:
self.pubsub_item = mb_data['id']
# we first create metadata file
meta_ori, meta_file_path = self.buildMetadataFile(content_file_path, mb_data)
@ -377,7 +375,7 @@ class Edit(base.CommandBase, BlogCommon, common.BaseEdit):
content = self.host.bridge.syntaxConvert(content, 'text', 'XHTML', False, self.profile)
if content and self.current_syntax != 'XHTML':
content = self.host.bridge.syntaxConvert(content, 'XHTML', self.current_syntax, False, self.profile)
return content, mb_data
return content, mb_data, mb_data['id']
def start(self):
# if there are user defined extension, we use them