feat(api): fixed update funnels
This commit is contained in:
parent
11d94a1799
commit
b3a78aeca8
2 changed files with 6 additions and 5 deletions
|
|
@ -2,7 +2,7 @@ import json
|
|||
|
||||
import chalicelib.utils.helper
|
||||
import schemas
|
||||
from chalicelib.core import events, significance, sessions
|
||||
from chalicelib.core import significance, sessions
|
||||
from chalicelib.utils import dev
|
||||
from chalicelib.utils import helper, pg_client
|
||||
from chalicelib.utils.TimeUTC import TimeUTC
|
||||
|
|
@ -61,7 +61,8 @@ def update(funnel_id, user_id, project_id, name=None, filter=None, is_public=Non
|
|||
AND project_id = %(project_id)s
|
||||
AND (user_id = %(user_id)s OR is_public)
|
||||
RETURNING *;""", {"user_id": user_id, "funnel_id": funnel_id, "name": name,
|
||||
"filter": json.dumps(filter) if filter is not None else None, "is_public": is_public})
|
||||
"filter": json.dumps(filter) if filter is not None else None, "is_public": is_public,
|
||||
"project_id": project_id})
|
||||
# print("--------------------")
|
||||
# print(query)
|
||||
# print("--------------------")
|
||||
|
|
|
|||
|
|
@ -223,9 +223,9 @@ def get_stages_and_events(filter_d, project_id) -> List[RealDictRow]:
|
|||
params = {"project_id": project_id, "startTimestamp": filter_d["startDate"], "endTimestamp": filter_d["endDate"],
|
||||
"issueTypes": tuple(filter_issues), **values}
|
||||
with pg_client.PostgresClient() as cur:
|
||||
print("---------------------------------------------------")
|
||||
print(cur.mogrify(n_stages_query, params))
|
||||
print("---------------------------------------------------")
|
||||
# print("---------------------------------------------------")
|
||||
# print(cur.mogrify(n_stages_query, params))
|
||||
# print("---------------------------------------------------")
|
||||
cur.execute(cur.mogrify(n_stages_query, params))
|
||||
rows = cur.fetchall()
|
||||
return rows
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue