def make_comment_node(self, vsts_data, thread_id, graph, url): ''' make a node so we can link things to and later save ''' raw_id = vsts_data.get('id') if raw_id is None: print("comment was not added id could not be generated") return None comment = Comment.select(graph, raw_id).first() if comment is None: comment = Comment() comment.Id = comment.get_id(raw_id, thread_id) if "commentType" in vsts_data: comment.CommentType = vsts_data.get("commentType", "") comment.Content = vsts_data.get("content", "") comment.LastContentUpdatedDate = vsts_data.get("lastContentUpdatedDate", "") comment.LastUpdatedDate = vsts_data.get("lastUpdatedDate", "") comment.PublishedDate = vsts_data.get("publishedDate", "") comment.Url = url return comment