Skip to content

Commit

Permalink
[processing] Fix Refactor Fields rejects valid field configuration input
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 26, 2017
1 parent 270c45d commit f8cf2f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/FieldsMapper.py
Expand Up @@ -68,7 +68,7 @@ def checkValueIsAcceptable(self, value, context=None):
return False
if not field_def.get('name', False):
return False
if not field_def.get('type', False):

This comment has been minimized.

Copy link
@m-kuhn

m-kuhn Sep 26, 2017

Member

Is field_def not something like a QList where you could call field_def.contains('type')?
Just a random thought while reading this.

This comment has been minimized.

Copy link
@nyalldawson

nyalldawson Sep 26, 2017

Author Collaborator

It's a python dict. I agree this could be cleaner.

This comment has been minimized.

Copy link
@m-kuhn

m-kuhn Sep 26, 2017

Member
if field_def.get('type', None) is None:
return False
if not field_def.get('expression', False):
return False
Expand Down

0 comments on commit f8cf2f4

Please sign in to comment.