Skip to content

Commit

Permalink
Fix postgres server imposed NOT NULL constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Aug 7, 2017
1 parent 5a64f58 commit 132d7f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/postgres/qgspostgresprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1828,7 +1828,7 @@ bool QgsPostgresProvider::skipConstraintCheck( int fieldIndex, QgsFieldConstrain
{
// stricter check - if we are evaluating default values only on commit then we can only bypass the check
// if the attribute values matches the original default clause
return mDefaultValues.contains( fieldIndex ) && mDefaultValues.value( fieldIndex ) == value.toString();
return mDefaultValues.contains( fieldIndex ) && mDefaultValues.value( fieldIndex ) == value.toString() && !value.isNull();
}
}

Expand Down

0 comments on commit 132d7f2

Please sign in to comment.