From 136b3dcdadf09aa589d1ddcc3433baf56e43ae37 Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Wed, 6 Dec 2023 00:09:34 -0800 Subject: [PATCH] Update URL field types in models.py --- offsets_db_api/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/offsets_db_api/models.py b/offsets_db_api/models.py index b3ebed4..0467f33 100644 --- a/offsets_db_api/models.py +++ b/offsets_db_api/models.py @@ -9,7 +9,7 @@ class File(SQLModel, table=True): id: int = Field(default=None, primary_key=True) - url: pydantic.AnyUrl + url: str content_hash: str | None = Field(description='Hash of file contents') status: FileStatus = Field(default='pending', description='Status of file processing') error: str | None = Field(description='Error message if processing failed') @@ -46,7 +46,7 @@ class ProjectBase(SQLModel): first_retirement_at: datetime.date | None = Field( description='Date of first retirement of credits' ) - project_url: pydantic.HttpUrl | None = Field(description='URL to project details') + project_url: str | None = Field(description='URL to project details') class Project(ProjectBase, table=True): @@ -64,7 +64,7 @@ class Project(ProjectBase, table=True): class ClipBase(SQLModel): date: datetime.date = Field(description='Date the clip was published') title: str | None = Field(description='Title of the clip') - url: pydantic.AnyUrl | None = Field(description='URL to the clip') + url: str | None = Field(description='URL to the clip') source: str | None = Field(description='Source of the clip') tags: list[str] | None = Field( description='Tags associated with the clip', sa_column=Column(postgresql.ARRAY(String()))