Skip to content

Commit

Permalink
Assignments are now directly added to sections and not into one list …
Browse files Browse the repository at this point in the history
…within the type: assign dictionary
  • Loading branch information
Jacob Daniel Bennett committed Sep 20, 2020
1 parent e45ce20 commit 3478903
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions api/ECNQueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand All @@ -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})

Expand Down

0 comments on commit 3478903

Please sign in to comment.