Skip to content

Commit

Permalink
Alternative fix to that in r5637 - fields that the user didn't touch
Browse files Browse the repository at this point in the history
are left to the database to fill in.


git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5639 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Jul 26, 2006
1 parent f061771 commit a343188
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/providers/postgres/qgspostgresprovider.cpp
Expand Up @@ -1602,6 +1602,7 @@ bool QgsPostgresProvider::addFeature(QgsFeature* f, int primaryKeyHighWater)
if (
(fieldname != geometryColumn) &&
(fieldname != primaryKey) &&
(!(it->fieldValue().isEmpty())) &&
(fieldInLayer)
)
{
Expand Down Expand Up @@ -1691,12 +1692,11 @@ bool QgsPostgresProvider::addFeature(QgsFeature* f, int primaryKeyHighWater)
if (
(fieldname != geometryColumn) &&
(fieldname != primaryKey) &&
(!(it->fieldValue().isEmpty())) &&
(fieldInLayer)
)
{
QString fieldvalue = it->fieldValue();
if (fieldvalue.isEmpty())
fieldvalue = "NULL";
bool charactertype=false;
insert+=",";

Expand Down

0 comments on commit a343188

Please sign in to comment.