Skip to content

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

Open
jmlefevrevulog wants to merge 1 commit into
akoidan:masterfrom
jmlefevrevulog:patch-1
Open

Update base.py => base.utils.IntegrityError(*tuple(e.args)) not exists#4
jmlefevrevulog wants to merge 1 commit into
akoidan:masterfrom
jmlefevrevulog:patch-1

Conversation

@jmlefevrevulog

Copy link
Copy Markdown

No description provided.

@akoidan

akoidan commented Jan 25, 2021

Copy link
Copy Markdown
Owner

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

@jmlefevrevulog

Copy link
Copy Markdown
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

akoidan commented Jan 25, 2021

Copy link
Copy Markdown
Owner

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

@jmlefevrevulog

jmlefevrevulog commented Jan 25, 2021 via email

Copy link
Copy Markdown
Author

@akoidan

akoidan commented Jan 25, 2021

Copy link
Copy Markdown
Owner

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
Copy Markdown
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

akoidan commented Jan 26, 2021

Copy link
Copy Markdown
Owner

Could you please pull from master and fix it?

@jmlefevrevulog

Copy link
Copy Markdown
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