Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vladistan committed Aug 9, 2024
1 parent f8d10ec commit aa76923
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/greenbutton_objects/atom/object_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ def get_related_of_type(self, elements_type: type) -> Iterable["EntryNode"]:
elements = [obj for obj in self.related if obj.content_type is elements_type]
return elements

def safe_get_content(self, type: type) -> Union[Any, None]:
obj = get_first(self.get_related_of_type(type))
def safe_get_content(self, content_type: type) -> Union[Any, None]:
obj = get_first(self.get_related_of_type(content_type))
return obj.first_content() if obj else None


Expand Down
2 changes: 1 addition & 1 deletion src/greenbutton_objects/orig_objects/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class IntervalReading:
current interval reading.
:ivar time_period: The date time and duration of a reading. If not specified,
readings for each “intervalLength” in ReadingType are present.
:ivar value: [correction] Value in units specified by ReadingType
:ivar raw_value: [correction] Value in units specified by ReadingType (not scaled)
:ivar consumption_tier: [extension] Code for consumption tier associated with reading.
:ivar tou: [extension] Code for the TOU type of reading.
:ivar cpp: [extension] Critical peak period (CPP) bucket the reading
Expand Down

0 comments on commit aa76923

Please sign in to comment.