Skip to content
Permalink
Browse files

[processing] Fix Refactor Fields rejects valid field configuration input

  • Loading branch information
nyalldawson committed Sep 26, 2017
1 parent 270c45d commit f8cf2f4dbe2c99fd3b6e3c6e79d53ece5f2bf628
Showing with 1 addition and 1 deletion.
  1. +1 −1 python/plugins/processing/algs/qgis/FieldsMapper.py
@@ -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
if field_def.get('type', None) is None:
return False
if not field_def.get('expression', False):
return False

0 comments on commit f8cf2f4

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