Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActionStep.url_contains can also be NULL #435

Merged
merged 1 commit into from
Apr 2, 2020

Conversation

mariusandra
Copy link
Collaborator

Fixes #380

Hi, investigating #380 I see this error when trying to update an action step with the type "custom event":

django.db.utils.IntegrityError: null value in column "url_matching" violates not-null constraint
DETAIL:  Failing row contains (20, null, null, null, null, null, null, 12, , null).

Apparently "url_matching" is the only column in the table that should not be null. When first creating an action or editing an action with a different type (pageview, frontend element), url_matches is always set to something. However when saving a custom event action step, "url_matching" is cleared on the frontend and then the backend gives an error.

The fix was either to put a random value into url_matches when saving the custom event action step... or removing this null field and preventing an ugly hack on the frontend. I chose the latter :).

@timgl timgl temporarily deployed to posthog-380-url-contain-ssgncb April 2, 2020 13:59 Inactive
@mariusandra mariusandra requested a review from timgl April 2, 2020 13:59
@timgl timgl merged commit 07dfb06 into master Apr 2, 2020
@timgl timgl deleted the 380-url-contains-can-be-null branch April 2, 2020 16:50
yakkomajuri pushed a commit that referenced this pull request Oct 1, 2021
* try to run this package from within posthog

* cat the log also here

* keep only production deps

* add database

* delete benchmark tests

* fix db urls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can not edit custom property in action
2 participants