Skip to content

Commit 8195804

Browse files
author
g_j_m
committed
Alternative fix to that in r5637 - fields that the user didn't touch
are left to the database to fill in. git-svn-id: http://svn.osgeo.org/qgis/trunk@5639 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 4d839dd commit 8195804

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/providers/postgres/qgspostgresprovider.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1602,6 +1602,7 @@ bool QgsPostgresProvider::addFeature(QgsFeature* f, int primaryKeyHighWater)
16021602
if (
16031603
(fieldname != geometryColumn) &&
16041604
(fieldname != primaryKey) &&
1605+
(!(it->fieldValue().isEmpty())) &&
16051606
(fieldInLayer)
16061607
)
16071608
{
@@ -1691,12 +1692,11 @@ bool QgsPostgresProvider::addFeature(QgsFeature* f, int primaryKeyHighWater)
16911692
if (
16921693
(fieldname != geometryColumn) &&
16931694
(fieldname != primaryKey) &&
1695+
(!(it->fieldValue().isEmpty())) &&
16941696
(fieldInLayer)
16951697
)
16961698
{
16971699
QString fieldvalue = it->fieldValue();
1698-
if (fieldvalue.isEmpty())
1699-
fieldvalue = "NULL";
17001700
bool charactertype=false;
17011701
insert+=",";
17021702

0 commit comments

Comments
 (0)