Skip to content

Commit f8cf2f4

Browse files
committedSep 26, 2017
[processing] Fix Refactor Fields rejects valid field configuration input
1 parent 270c45d commit f8cf2f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎python/plugins/processing/algs/qgis/FieldsMapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def checkValueIsAcceptable(self, value, context=None):
6868
return False
6969
if not field_def.get('name', False):
7070
return False
71-
if not field_def.get('type', False):

Comment on line R71

m-kuhn commented on Sep 26, 2017

@m-kuhn
Member

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

nyalldawson replied on Sep 26, 2017

@nyalldawson
CollaboratorAuthor

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

m-kuhn replied on Sep 26, 2017

@m-kuhn
Member
Code has comments. Press enter to view.
71+
if field_def.get('type', None) is None:
7272
return False
7373
if not field_def.get('expression', False):
7474
return False

0 commit comments

Comments
 (0)
Please sign in to comment.