Skip to content
Permalink
Browse files

[GRASS] do not insert records if table does not exist

  • Loading branch information
blazek committed Oct 7, 2015
1 parent e223bcc commit 9b54ed443e6073cedb209cfea76c5f5281334b91
Showing with 6 additions and 3 deletions.
  1. +6 −3 src/providers/grass/qgsgrassprovider.cpp
@@ -1332,10 +1332,13 @@ void QgsGrassProvider::onFeatureAdded( QgsFeatureId fid )
}
else
{
mLayer->insertAttributes( newCat, feature, error );
if ( !error.isEmpty() )
if ( mLayer->hasTable() )
{
QgsGrass::warning( error );
mLayer->insertAttributes( newCat, feature, error );
if ( !error.isEmpty() )
{
QgsGrass::warning( error );
}
}
}
}

0 comments on commit 9b54ed4

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