Created
January 17, 2012 19:21
-
-
Save jef-n/1628301 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/providers/postgres/qgspostgresprovider.cpp b/src/providers/postgres/qgspostgresprovider.cpp | |
index a1ecaa2..8c8d3e8 100644 | |
--- a/src/providers/postgres/qgspostgresprovider.cpp | |
+++ b/src/providers/postgres/qgspostgresprovider.cpp | |
@@ -1949,7 +1949,7 @@ bool QgsPostgresProvider::addFeatures( QgsFeatureList &flist ) | |
} | |
for ( int i = 0; i < fieldId.size(); i++ ) | |
- params << paramValue( attributevec[ fieldId[i] ].toString(), defaultValues[i] ); | |
+ params << paramValue( attributevec.value( fieldId[i], defaultValues[i] ).toString(), defaultValues[i] ); | |
QgsPostgresResult result = mConnectionRW->PQexecPrepared( "addfeatures", params ); | |
if ( result.PQresultStatus() == PGRES_FATAL_ERROR ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment