mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
Try to fix postgres provider handling of missing attributes
This commit is contained in:
parent
877efca82e
commit
84d2443b0a
@ -2158,7 +2158,7 @@ bool QgsPostgresProvider::addFeatures( QgsFeatureList &flist, Flags flags )
|
||||
for ( int i = 0; i < fieldId.size(); i++ )
|
||||
{
|
||||
int attrIdx = fieldId[i];
|
||||
QVariant value = attrs.at( attrIdx );
|
||||
QVariant value = attrIdx < attrs.length() ? attrs.at( attrIdx ) : QVariant( QVariant::Int );
|
||||
|
||||
QString v;
|
||||
if ( value.isNull() )
|
||||
|
Loading…
x
Reference in New Issue
Block a user