diff --git a/code/backend/nest_backend/database/tables/Repository.py b/code/backend/nest_backend/database/tables/Repository.py index 7484202..669c9d6 100644 --- a/code/backend/nest_backend/database/tables/Repository.py +++ b/code/backend/nest_backend/database/tables/Repository.py @@ -22,5 +22,5 @@ class Repository(Base.Model): uses = Base.relationship("Uses", back_populates="repository") def to_json(self): - return {"id": self.id, "name": self.name, "start": self.start.isoformat(), "isActive":self.isActive, - "end":self.end.isoformat(),"owner": self.owner.to_json()} + return {"id": self.id, "name": self.name, "start": (self.start.isoformat() if self.start is not None else ""), "isActive":self.isActive, + "end":(self.end.isoformat() if self.end is not None else ""),"owner": self.owner.to_json()}