Skip to content

Commit

Permalink
Removed Item.toJson b/c Item.json is serializable
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Campbell committed Jul 27, 2020
1 parent d4aaebf commit 79ac336
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions api/ECNQueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __init__(self, queue: str, number: int) -> None:
self.building = self.__getMostRecentHeaderByType("Building")
self.dateReceived = self.__getMostRecentHeaderByType("Date")

self.jsonData = {
self.json = {
"lastUpdated": self.lastUpdated,
"headers": self.headers,
"content": self.content,
Expand Down Expand Up @@ -260,14 +260,6 @@ def __getAssignedTo(self) -> str:
assignedTo = self.__getMostRecentHeaderByType("Assigned-To")
return assignedTo

def toJson(self) -> dict:
"""Returns a JSON safe representation of the item.
Returns:
dict: JSON safe representation of the item.
"""
return json.dumps(self.jsonData)

def __repr__(self) -> str:
return self.queue + str(self.number)

Expand Down

0 comments on commit 79ac336

Please sign in to comment.