Skip to content
Permalink
Browse files

Fix attribute form python cleanup

  • Loading branch information
Hugo Mercier
Hugo Mercier committed May 29, 2017
1 parent 88a6d2b commit 1f22df78133f69de816ea519d0f799cd44326954
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/gui/qgsattributeform.cpp
@@ -1407,7 +1407,7 @@ void QgsAttributeForm::cleanPython()
{
if ( !mPyFormVarName.isNull() )
{
QString expr = QStringLiteral( "if locals().has_key('%1'): del %1\n" ).arg( mPyFormVarName );
QString expr = QStringLiteral( "if '%1' in locals(): del %1\n" ).arg( mPyFormVarName );
QgsPythonRunner::run( expr );
}
}

0 comments on commit 1f22df7

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