You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2020/04/13 17:42:59 UTC

[allura] 07/50: [#7935] Added missing attributes

This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 28d7e7fb64088ffcf669ff3c01f70efad4cfeb97
Author: Fahri Korkmaz <f....@codesys.com>
AuthorDate: Thu Jan 30 14:33:44 2020 +0100

    [#7935] Added missing attributes
---
 ForgeImporters/forgeimporters/forge/discussion.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/ForgeImporters/forgeimporters/forge/discussion.py b/ForgeImporters/forgeimporters/forge/discussion.py
index 688c7b2..fb3bd74 100644
--- a/ForgeImporters/forgeimporters/forge/discussion.py
+++ b/ForgeImporters/forgeimporters/forge/discussion.py
@@ -115,7 +115,8 @@ class ForgeDiscussionImporter(ToolImporter):
 				new_forum = dict(
                     			app_config_id = app.config._id,
                     			shortname=forum_json['shortname'],
-                    			_id=forum_json.get('_id', ''),
+                                discussion_id=forum_json.get('discussion_id', None),
+                    			_id=forum_json.get('_id', None),
                     			description=forum_json['description'],
                     			name=forum_json['name'],
                     			create='on',
@@ -174,9 +175,13 @@ class ForgeDiscussionImporter(ToolImporter):
                         subject=post_json['subject'],
                         text=post_json['text'], 
                         ignore_security=True,
-                        timestamp=parse(post_json['timestamp'])
+                        timestamp=parse(post_json['timestamp']),
+                        last_edited=post_json['last_edited']
                 )
 
+                if "slug" in post_json.keys():
+                    p.slug = post_json['slug']
+
                 try:
                     p.add_multiple_attachments([File(a['url'])
                                                 for a in post_json['attachments']])