From cbeab9dc26aca1812cf803260f6341f757b29c89 Mon Sep 17 00:00:00 2001 From: Leo Ueno Date: Mon, 4 Nov 2024 15:23:34 -0800 Subject: [PATCH] Allow null "updated" or "created" timestamps --- roboflow/core/project.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roboflow/core/project.py b/roboflow/core/project.py index b7e66c0..6c51b13 100644 --- a/roboflow/core/project.py +++ b/roboflow/core/project.py @@ -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"] @@ -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("/")