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

Update base.py => base.utils.IntegrityError(*tuple(e.args)) not exists #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jmlefevrevulog
Copy link

No description provided.

@akoidan
Copy link
Owner

akoidan commented Jan 25, 2021

You missed some changes. I created and uploaded this under version 2.0.0 please check if it works.

@jmlefevrevulog
Copy link
Author

You missed some changes. I created and uploaded this under version 2.0.0 please check if it works.

LogDB Error : e.cls:[OperationalError], e.bytes:[(1048, "Column 'foobar' cannot be null")] => Seems I should have integrityError right ?

@akoidan
Copy link
Owner

akoidan commented Jan 25, 2021

Not sure, could you please check what default engine throws?

@jmlefevrevulog
Copy link
Author

jmlefevrevulog commented Jan 25, 2021 via email

@akoidan
Copy link
Owner

akoidan commented Jan 25, 2021

Of course it does. I mean you expect IntegrityEror but you're getting OperationalError when you're using mysql_has_gone_away engine in settings.py. If you use standard mysql engine, does it throw the same?

@jmlefevrevulog
Copy link
Author

I set back conf to original MySQL driver and retry it:
Error : e.cls:[IntegrityError], e.bytes:[(1048, "Column 'xxxxxxx' cannot be null")]
So it seems it should throw an integrity error and not a OperationalError

@akoidan
Copy link
Owner

akoidan commented Jan 26, 2021

Could you please pull from master and fix it?

@jmlefevrevulog
Copy link
Author

I may have a look but don't know when ...
My test case raising the error is using django, having a required field in a model and try inserting without the required field.

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