Skip to content

Commit

Permalink
Merge pull request #338 from roboflow/leo/null-updated-timestamp
Browse files Browse the repository at this point in the history
Allow null "updated" or "created" timestamps
  • Loading branch information
stellasphere authored Nov 4, 2024
2 parents 0d6b37d + cbeab9d commit 7b1a8bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions roboflow/core/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def __init__(self, api_key: str, a_project: dict, model_format: Optional[str] =
self.annotation = a_project["annotation"]
self.classes = a_project["classes"]
self.colors = a_project["colors"]
self.created = datetime.datetime.fromtimestamp(a_project["created"])
self.created = datetime.datetime.fromtimestamp(a_project["created"]) if a_project["created"] else None
self.id = a_project["id"]
self.images = a_project["images"]
self.name = a_project["name"]
Expand All @@ -69,7 +69,7 @@ def __init__(self, api_key: str, a_project: dict, model_format: Optional[str] =
self.type = a_project["type"]
self.multilabel = a_project.get("multilabel", False)
self.unannotated = a_project["unannotated"]
self.updated = datetime.datetime.fromtimestamp(a_project["updated"])
self.updated = datetime.datetime.fromtimestamp(a_project["updated"]) if a_project["updated"] else None
self.model_format = model_format

temp = self.id.rsplit("/")
Expand Down

0 comments on commit 7b1a8bc

Please sign in to comment.