Skip to content

Conversation

@LeJeko
Copy link
Contributor

@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 now set displayValue to an empty string ''

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

@davidhamann davidhamann merged commit ae12042 into davidhamann:master Jan 22, 2024
@davidhamann
Copy link
Owner

Good catch, thanks.

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.

2 participants