Skip to content

Fix valueList without displayValue key#7

Merged
LeJeko merged 2 commits intomasterfrom
fix-valueList
Jan 20, 2024
Merged

Fix valueList without displayValue key#7
LeJeko merged 2 commits intomasterfrom
fix-valueList

Conversation

@LeJeko
Copy link
Copy Markdown
Owner

@LeJeko LeJeko commented Jan 20, 2024

Just a quick fix to avoid a crash of the get_value_list_values function when a value list contains an empty entry and FileMaker does not return a displayValue key.

['valueLists':
    [
        {'name': 'my_value_list',
         'type': 'customList',
         'values':
             [ 
                {'value': ''},
                {'displayValue': 'A', 'value': 'a'},
                {'displayValue': 'B', 'value': 'b'},
                {'displayValue': 'C', 'value': 'c'}
                ]
        }
    ]
]

In this case, the function set displayValue to an empty string ''

[('', ''), ('a', 'A'), ('b', 'B'), ('c', 'C')]

@LeJeko LeJeko merged commit 1c36ac7 into master Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant