Skip to content
Permalink
Browse files

Fix postgres server imposed NOT NULL constraint

  • Loading branch information
m-kuhn committed Aug 7, 2017
1 parent 5a64f58 commit 132d7f2a1ec3a508fbb03a8348d94d8c145e8815
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/providers/postgres/qgspostgresprovider.cpp
@@ -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();
}
}

0 comments on commit 132d7f2

Please sign in to comment.
You can’t perform that action at this time.