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

Adding values in get_prep_value sometimes causes IntegrityError #16

Open
tirkarthi opened this issue Mar 5, 2018 · 0 comments
Open

Comments

@tirkarthi
Copy link

If strip=False then escaping introduces extra characters than the given string which might lead to integrity constraint errors while saving to database. This is caused since when we have a 100 character column and we give 80 characters of HTML with strip as False then validation passes through but the escaping adds more characters that might cause the string length to be more than 100 characters while saving to database. The safe way will be to use strip=True. I don't know how this can be handled in this layer but just wanted to give a heads up on this.

Thanks for the library.

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

No branches or pull requests

1 participant