From 485c57a23c730cd0a662853eadea5e6e57db4280 Mon Sep 17 00:00:00 2001 From: Honza Javorek Date: Thu, 16 May 2024 21:20:56 +0200 Subject: [PATCH] use date, not datetime --- jg/hen/insights/projects.py | 4 ++-- jg/hen/models.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/jg/hen/insights/projects.py b/jg/hen/insights/projects.py index 0f08a68..c92a891 100644 --- a/jg/hen/insights/projects.py +++ b/jg/hen/insights/projects.py @@ -19,8 +19,8 @@ async def projects(contexts: list[RepositoryContext]) -> list[dict[str, Any]]: "live_url": context.repo.homepage or None, "description": context.repo.description, "priority": context.pin, - "start_at": context.repo.created_at, - "end_at": context.repo.pushed_at, + "start_on": context.repo.created_at.date(), + "end_on": context.repo.pushed_at.date(), "topics": context.repo.topics, } ) diff --git a/jg/hen/models.py b/jg/hen/models.py index ff923e6..7708f60 100644 --- a/jg/hen/models.py +++ b/jg/hen/models.py @@ -1,4 +1,4 @@ -from datetime import datetime +from datetime import date from enum import StrEnum, auto from typing import Any, Self @@ -40,8 +40,8 @@ class ProjectInfo(BaseModel): live_url: str | None description: str | None priority: int | None - start_at: datetime - end_at: datetime + start_on: date + end_on: date topics: list[str]