Skip to content

Commit 7e7f846

Browse files
committed
Fix pipeline errors
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
1 parent e596ba9 commit 7e7f846

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

vulnerabilities/importer.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ def to_dict(self):
6363
"scoring_elements": self.scoring_elements,
6464
}
6565
if self.published_at:
66-
data["published_at"] = self.published_at.isoformat()
66+
if isinstance(self.published_at, datetime.datetime):
67+
data["published_at"] = self.published_at.isoformat()
68+
else:
69+
data["published_at"] = self.published_at
6770
return data
6871

6972
def __lt__(self, other):

0 commit comments

Comments
 (0)