Skip to content

Commit

Permalink
fe change
Browse files Browse the repository at this point in the history
  • Loading branch information
aspicer committed Jan 24, 2025
1 parent 377a1cc commit e5a93e9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
14 changes: 12 additions & 2 deletions frontend/src/scenes/actions/actionEditLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,21 @@ export const actionEditLogic = kea<actionEditLogicType>([

submit: async (updatedAction, breakpoint) => {
let action: ActionType
// Remove URL from steps if it's not an autocapture or a pageview
let updatedSteps = updatedAction.steps
if (updatedSteps !== undefined) {
updatedSteps = updatedSteps.map((step) => ({
...step,
...(step.event === '$autocapture' || step.event === '$pageview'
? {}
: { url: null, url_matching: null }),
}))
}
try {
if (updatedAction.id) {
action = await api.actions.update(updatedAction.id, updatedAction)
action = await api.actions.update(updatedAction.id, { ...updatedAction, steps: updatedSteps })
} else {
action = await api.actions.create(updatedAction)
action = await api.actions.create({ ...updatedAction, steps: updatedSteps })
}
breakpoint()
} catch (response: any) {
Expand Down
1 change: 1 addition & 0 deletions posthog/hogql/property.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ def action_to_expr(action: Action) -> ast.Expr:
{"value": ast.Constant(value=value)},
)
)

if step.url:
if step.url_matching == "exact":
expr = parse_expr(
Expand Down

0 comments on commit e5a93e9

Please sign in to comment.