Skip to content
Permalink
Browse files

Fix spatialite crash on field added

  • Loading branch information
github-actions authored and nyalldawson committed Feb 12, 2020
1 parent a6cea90 commit 900732ba1e094e083142b39967cab9b1b3d7ce57
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/providers/spatialite/qgsspatialiteprovider.cpp
@@ -1022,6 +1022,11 @@ QVariant QgsSpatiaLiteProvider::defaultValue( int fieldId ) const

QString QgsSpatiaLiteProvider::defaultValueClause( int fieldIndex ) const
{
if ( ! mAttributeFields.exists( fieldIndex ) )
{
return QString();
}

if ( mAttributeFields.at( fieldIndex ).name() == mPrimaryKey && mPrimaryKeyAutoIncrement )
{
return tr( "Autogenerate" );

0 comments on commit 900732b

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