Using Optional[str] instead of str | None for optional fields
All checks were successful
AWS Deploy on Push / build (push) Successful in 1m7s
All checks were successful
AWS Deploy on Push / build (push) Successful in 1m7s
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import List
|
from typing import List, Optional
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
@@ -31,11 +31,11 @@ class ChannelCreate(BaseModel):
|
|||||||
|
|
||||||
class ChannelUpdate(BaseModel):
|
class ChannelUpdate(BaseModel):
|
||||||
"""Pydantic model for updating channels"""
|
"""Pydantic model for updating channels"""
|
||||||
name: str | None = None
|
name: Optional[str] = None
|
||||||
group_title: str | None = None
|
group_title: Optional[str] = None
|
||||||
tvg_id: str | None = None
|
tvg_id: Optional[str] = None
|
||||||
tvg_logo: str | None = None
|
tvg_logo: Optional[str] = None
|
||||||
tvg_name: str | None = None
|
tvg_name: Optional[str] = None
|
||||||
|
|
||||||
class ChannelResponse(BaseModel):
|
class ChannelResponse(BaseModel):
|
||||||
"""Pydantic model for channel responses"""
|
"""Pydantic model for channel responses"""
|
||||||
|
|||||||
Reference in New Issue
Block a user