fix(api): fix shadows an attribute in parent in ListEvents for field schema
This commit is contained in:
		@@ -29,7 +29,7 @@ async def get_listevents_page_by_creator_id(connection: AsyncConnection, creator
 | 
			
		||||
            list_events_table.c.title,
 | 
			
		||||
            list_events_table.c.creator_id,
 | 
			
		||||
            list_events_table.c.created_at,
 | 
			
		||||
            list_events_table.c.schema,
 | 
			
		||||
            list_events_table.c.schema_,
 | 
			
		||||
            list_events_table.c.state,
 | 
			
		||||
            list_events_table.c.status,
 | 
			
		||||
        )
 | 
			
		||||
@@ -162,7 +162,7 @@ async def create_listevents(connection: AsyncConnection, listevents: ListEvent,
 | 
			
		||||
        title=listevents.title,  # добавлено поле title
 | 
			
		||||
        creator_id=creator_id,
 | 
			
		||||
        created_at=datetime.now(timezone.utc),
 | 
			
		||||
        schema=listevents.schema,  # добавлено поле schema
 | 
			
		||||
        schema=listevents.schema_,  # добавлено поле schema
 | 
			
		||||
        state=listevents.state.value,  # добавлено поле state
 | 
			
		||||
        status=listevents.status.value  # добавлено поле status
 | 
			
		||||
    )
 | 
			
		||||
 
 | 
			
		||||
@@ -13,7 +13,7 @@ class ListEventUpdate(Base):
 | 
			
		||||
    title: Optional[str] = Field(None, max_length=64)
 | 
			
		||||
    # creator_id: Optional[int] = None
 | 
			
		||||
    # created_at: Optional[datetime]= None
 | 
			
		||||
    schema: Optional[Dict[str, Any]]= None
 | 
			
		||||
    schema_: Optional[Dict[str, Any]]= Field(None, alias="schema")
 | 
			
		||||
    state: Optional[EventState]= None
 | 
			
		||||
    status: Optional[EventStatus]= None
 | 
			
		||||
 | 
			
		||||
@@ -23,7 +23,7 @@ class AllListEvent(Base):
 | 
			
		||||
    title: str
 | 
			
		||||
    creator_id: int
 | 
			
		||||
    created_at: datetime
 | 
			
		||||
    schema: Dict[str, Any] = Field(default={})
 | 
			
		||||
    schema_: Dict[str, Any] = Field(default={}, alias="schema")
 | 
			
		||||
    state: EventState
 | 
			
		||||
    status: EventStatus
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -12,6 +12,6 @@ class ListEvent(Base):
 | 
			
		||||
    title: str = Field(..., max_length=64)
 | 
			
		||||
    creator_id: int
 | 
			
		||||
    created_at: datetime
 | 
			
		||||
    schema: Dict[str, Any]
 | 
			
		||||
    schema_: Dict[str, Any] = Field(..., alias="schema")
 | 
			
		||||
    state: EventState
 | 
			
		||||
    status: EventStatus
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user