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

Stop violating not null constraint #811

Merged
merged 1 commit into from Nov 21, 2020

Conversation

dasJ
Copy link
Member

@dasJ dasJ commented Sep 13, 2020

Fixes this error:

ERROR: failed to process declarative jobset test:inputs,
DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Pg::st
execute failed: ERROR: null value in column "emailoverride" violates
not-null constraint

cc @basvandijk

dasJ added a commit to helsinki-systems/hydra that referenced this pull request Sep 13, 2020
- Document the fields
- Default most fields
- Mostly validate fields
- Allow rich values for `enabled` and `type`
- Print all errors instead of only the first

This also includes NixOS#811
@@ -57,7 +57,7 @@ sub updateDeclarativeJobset {
name => $name,
type => $data->{type}
};
$row->{emailresponsible} = $data->{emailresponsible} if defined $data->{emailresponsible};
$row->{emailresponsible} = $data->{emailresponsible} or 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be // 0? I think or binds very weakly.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But that doesn't matter, does it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't it parse as ($row->{emailresponsible} = $data->{emailresponsible}) or 0;? I could be wrong.

dhess pushed a commit to hackworthltd/hacknix that referenced this pull request Sep 17, 2020
dhess pushed a commit to hackworthltd/hacknix that referenced this pull request Sep 17, 2020
@dasJ
Copy link
Member Author

dasJ commented Nov 21, 2020

@edolstra Fixed and rebased

Fixes this error:

ERROR: failed to process declarative jobset test:inputs,
DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Pg::st
execute failed: ERROR:  null value in column "emailoverride" violates
not-null constraint
@edolstra edolstra merged commit bde8d81 into NixOS:master Nov 21, 2020
@ajs124 ajs124 deleted the fix/override-constraint branch November 21, 2020 23:46
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.

None yet

2 participants