fix(chalice): heatmap handles empty/null url (#2691)
This commit is contained in:
parent
b353c818c3
commit
e2556ea76e
3 changed files with 5 additions and 1 deletions
|
|
@ -9,6 +9,8 @@ logger = logging.getLogger(__name__)
|
|||
|
||||
|
||||
def get_by_url(project_id, data: schemas.GetHeatMapPayloadSchema):
|
||||
if data.url is None or data.url == "":
|
||||
return []
|
||||
args = {"startDate": data.startTimestamp, "endDate": data.endTimestamp,
|
||||
"project_id": project_id, "url": data.url}
|
||||
constraints = ["sessions.project_id = %(project_id)s",
|
||||
|
|
|
|||
|
|
@ -1595,7 +1595,7 @@ class HeatMapFilterSchema(BaseModel):
|
|||
|
||||
|
||||
class GetHeatMapPayloadSchema(_TimedSchema):
|
||||
url: str = Field(...)
|
||||
url: Optional[str] = Field(...)
|
||||
filters: List[HeatMapFilterSchema] = Field(default=[])
|
||||
click_rage: bool = Field(default=False)
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ logger = logging.getLogger(__name__)
|
|||
|
||||
|
||||
def get_by_url(project_id, data: schemas.GetHeatMapPayloadSchema):
|
||||
if data.url is None or data.url == "":
|
||||
return []
|
||||
args = {"startDate": data.startTimestamp, "endDate": data.endTimestamp,
|
||||
"project_id": project_id, "url": data.url}
|
||||
constraints = ["main_events.project_id = toUInt16(%(project_id)s)",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue