Skip to content

Commit

Permalink
Moved the content attribute in item to be defined after all the other…
Browse files Browse the repository at this point in the history
… attributes
  • Loading branch information
benne238 committed Jun 29, 2021
1 parent 0f69c18 commit 42bb135
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/webqueue2api/parser/item.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ def __init__(self, queue: str, number: int, headers_only: bool = False) -> None:
self.last_updated = self.__get_time_last_updated()
self.__raw_item = self.__get_raw_item()
self.headers = self.__parse_headers()
if not headers_only: self.content = self.__parseSections()
self.is_locked = self.__check_is_locked()
self.user_email = self.__parse_from_data(data="user_email")
self.user_name = self.__parse_from_data(data="user_name")
Expand All @@ -79,6 +78,7 @@ def __init__(self, queue: str, number: int, headers_only: bool = False) -> None:
self.department = self.__get_most_recent_header_by_type("Department")
self.building = self.__get_most_recent_header_by_type("Building")
self.date_received = format_date_string(self.__get_most_recent_header_by_type("Date"))
if not headers_only: self.content = self.__parseSections()
self.json_data = self.__generate_json_data()

def __generate_json_data(self) -> dict:
Expand Down

0 comments on commit 42bb135

Please sign in to comment.