Dev (#2487)
* fix(chalice): fixed Math-operators validation refactor(chalice): search for sessions that have events for heatmaps * refactor(chalice): search for sessions that have at least 1 location event for heatmaps * fix(chalice): fixed Math-operators validation refactor(chalice): search for sessions that have events for heatmaps * refactor(chalice): search for sessions that have at least 1 location event for heatmaps * feat(chalice): autocomplete return top 10 with stats * fix(chalice): fixed autocomplete top 10 meta-filters * fix(chalice): fixed schemas field validator
This commit is contained in:
parent
4b8af90b18
commit
3e3bf30633
3 changed files with 9 additions and 7 deletions
|
|
@ -19,9 +19,9 @@ python3-saml = "==1.16.0"
|
|||
redis = "==5.1.0b6"
|
||||
azure-storage-blob = "==12.22.0"
|
||||
cachetools = "==5.4.0"
|
||||
psycopg = {extras = ["pool", "binary"], version = "==3.2.1"}
|
||||
psycopg = {extras = ["binary", "pool"], version = "==3.2.1"}
|
||||
uvicorn = {extras = ["standard"], version = "==0.30.5"}
|
||||
pydantic = {extras = ["email"], version = "==2.3.0"}
|
||||
pydantic = {extras = ["email"], version = "==2.8.2"}
|
||||
clickhouse-driver = {extras = ["lz4"], version = "==0.2.8"}
|
||||
|
||||
[dev-packages]
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ from typing import Optional, List
|
|||
|
||||
from pydantic import Field, field_validator
|
||||
|
||||
from .overrides import BaseModel, Enum, ORUnion
|
||||
from .overrides import BaseModel
|
||||
|
||||
|
||||
class AssistStatsAverage(BaseModel):
|
||||
|
|
@ -60,13 +60,15 @@ class AssistStatsSessionsRequest(BaseModel):
|
|||
userId: Optional[int] = Field(default=None)
|
||||
|
||||
@field_validator("sort")
|
||||
def validate_sort(self, v):
|
||||
@classmethod
|
||||
def validate_sort(cls, v):
|
||||
if v not in assist_sort_options:
|
||||
raise ValueError(f"Invalid sort option. Allowed options: {', '.join(assist_sort_options)}")
|
||||
return v
|
||||
|
||||
@field_validator("order")
|
||||
def validate_order(self, v):
|
||||
@classmethod
|
||||
def validate_order(cls, v):
|
||||
if v not in ["desc", "asc"]:
|
||||
raise ValueError("Invalid order option. Must be 'desc' or 'asc'.")
|
||||
return v
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@ from typing import Optional, List, Union, Literal
|
|||
|
||||
from pydantic import Field, EmailStr, field_validator, model_validator
|
||||
|
||||
from . import schemas
|
||||
from chalicelib.utils.TimeUTC import TimeUTC
|
||||
from . import schemas
|
||||
from .overrides import BaseModel, Enum, ORUnion
|
||||
from .transformers_validators import remove_whitespace, remove_duplicate_values
|
||||
from .transformers_validators import remove_whitespace
|
||||
|
||||
|
||||
class Permissions(str, Enum):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue