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

Fix validation rule bug for registration #107

Merged
merged 1 commit into from
Sep 18, 2019

Conversation

michalsn
Copy link
Contributor

When we try to register a user using PostgreSQL, we receive an error:

pg_query(): Query failed: ERROR: invalid input syntax for integer: "{id}" LINE 4: AND "id" != '{id}'

This wasn't popping up when using MySQL, because PostgreSQL is more restrictive. So, running the query:

SELECT 1 FROM "users" WHERE "email" = '[email protected]' AND "id" != '{id}' LIMIT 1

is fine on mysql but not really on postgresql. But in both cases, it's a bug actually.

The fix comes down to changing the validation rules for registration.

@lonnieezell lonnieezell merged commit f1b6cea into lonnieezell:develop Sep 18, 2019
@michalsn michalsn deleted the feature/registration_fix branch September 18, 2019 14:09
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.

2 participants