Skip to content

Commit

Permalink
Merge pull request #5 from Daanoz/bugfix/4-keyerror-title
Browse files Browse the repository at this point in the history
bugfix: #4 missing key title
  • Loading branch information
Daanoz committed Mar 6, 2023
2 parents 7a5793b + 236fcb7 commit 68ac0e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion custom_components/google_photos/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def get_albums() -> List[Album]:
.execute()
)
album_list = album_list + result["albums"]
return album_list
return list(filter(lambda a: ("id" in a and "title" in a), album_list))

albums = await self.hass.async_add_executor_job(get_albums)
album_selection = dict({CONF_ALBUM_ID_FAVORITES: "Favorites"})
Expand Down
2 changes: 1 addition & 1 deletion custom_components/google_photos/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def get_device_info(self) -> DeviceInfo:
},
manufacturer=MANUFACTURER,
name="Google Photos - " + self.album.get("title"),
configuration_url=self.album.get("productUrl"),
configuration_url=self.album.get("productUrl", None),
)

def set_context(self, context: dict[str, str | int]):
Expand Down

0 comments on commit 68ac0e8

Please sign in to comment.