diff --git a/api/ECNQueue.py b/api/ECNQueue.py index 2181861..cea3cc4 100644 --- a/api/ECNQueue.py +++ b/api/ECNQueue.py @@ -97,7 +97,7 @@ def __init__(self, queue: str, number: int) -> None: self.userEmail = self.__parseFromData(data="userEmail") self.userName = self.__parseFromData(data="userName") self.userAlias = self.__getUserAlias() - self.assignedTo = self.__getAssignedTo() + self.assignedTo = self.__getMostRecentHeaderByType("Assigned-To") self.subject = self.__getMostRecentHeaderByType("Subject") self.status = self.__getMostRecentHeaderByType("Status") self.priority = self.__getMostRecentHeaderByType("Priority") @@ -1033,7 +1033,6 @@ def __getSortedSections(self, sectionsList: list) -> list: return sortedSections - def __isLocked(self) -> Union[str, bool]: """Returns a string info about the lock if true and a bool False if false @@ -1114,16 +1113,6 @@ def __getUserAlias(self) -> str: """ emailUser, emailDomain = self.userEmail.split("@") return emailUser if emailDomain.endswith("purdue.edu") else "" - - def __getAssignedTo(self) -> str: - """Returns the alias of the person this item was most recently assigned to. - Returns empty string if this item isn't assigned. - - Returns: - str: Alias of the person item is assigned to or empty string. - """ - assignedTo = self.__getMostRecentHeaderByType("Assigned-To") - return assignedTo def __getFormattedDate(self, date: str) -> str: """Returns the date/time formatted as RFC 8601 YYYY-MM-DDTHH:MM:SS+00:00. @@ -1233,10 +1222,4 @@ def getQueues() -> list: if isDirectory and isValid: queues.append(Queue(file)) - return queues - -if __name__ == "__main__": - start = time.time() - queues = getQueues() - end = time.time() - print(f'Fetching all queues took {end - start}s') \ No newline at end of file + return queues \ No newline at end of file