Skip to content

Commit

Permalink
Allow null "updated" or "created" timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
stellasphere committed Nov 4, 2024
1 parent 0d6b37d commit cbeab9d
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 cbeab9d

Please sign in to comment.