From 347890360791d750b98c3e60d8497396bb0a529e Mon Sep 17 00:00:00 2001 From: Jacob Daniel Bennett Date: Sun, 20 Sep 2020 17:40:01 -0400 Subject: [PATCH] Assignments are now directly added to sections and not into one list within the type: assign dictionary --- api/ECNQueue.py | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/api/ECNQueue.py b/api/ECNQueue.py index da2cf33..114c856 100644 --- a/api/ECNQueue.py +++ b/api/ECNQueue.py @@ -321,8 +321,7 @@ def __parseSections(self) -> list: "content": initialMessageContent} ) - # Stores all assignment history in a list of dictionaries - assignmentHistoryList = [] + # Assignment Information assignedBy = "" assignedDateTime = "" assignedTo = "" @@ -349,19 +348,13 @@ def __parseSections(self) -> list: assignedBy = (re.search("(?<=Assigned-To-Updated-By: )(.*)", line)).group() - # Aissignment_Updated_By signifies the end of the assignment event - # and all information is appended in a dictionary to assignment history - assignmentHistoryList.append( - {"by": assignedBy, + # Appends the assignment to the sections list + sections.append( + {"type": "assign", + "by": assignedBy, "datetime": assignedDateTime, "to": assignedTo} - ) - - # Appends the whole list of assignment history to the sections list - sections.append( - {"type": "assign", - "content": assignmentHistoryList} - ) + ) sectionBoundaries.append({"start": contentEnd + 1})