Skip to content

Commit

Permalink
Fix attribute form python cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo Mercier committed May 29, 2017
1 parent 88a6d2b commit 1f22df7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/qgsattributeform.cpp
Expand Up @@ -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 );
}
}
Expand Down

0 comments on commit 1f22df7

Please sign in to comment.