Skip to content

Commit

Permalink
Fix restore issues with blank datetime values (#1206)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed May 22, 2020
1 parent 0686a14 commit 4c9f381
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions custom_components/hacs/repositories/repositorydata.py
Expand Up @@ -73,6 +73,8 @@ def create_from_dict(source: dict):
for key in source:
if key in data.__dict__:
if key == "pushed_at":
if source[key] == "":
continue
if "Z" in source[key]:
setattr(
data,
Expand Down Expand Up @@ -101,6 +103,8 @@ def update_data(self, data: dict):
for key in data:
if key in self.__dict__:
if key == "pushed_at":
if data[key] == "":
continue
if "Z" in data[key]:
setattr(
self,
Expand Down

0 comments on commit 4c9f381

Please sign in to comment.