Flexmail issue with custom multiple_choice fields that allow multiple answers

Created on 9 June 2023, almost 2 years ago
Updated 4 July 2023, almost 2 years ago

When fetching data about custom fields (see https://api.flexmail.eu/documentation/#get-/custom-fields), each multiple_choice custom field used to have a property: allows_multiple_values. This was used to pass a string or array of strings to the API. This property is no longer present in the output of the endpoint. If we try to add data for a multiple_choice field with multiple options being selectable, it always fails.

This is / seems to be a problem fully with the REST API from Flexmail atm

🐛 Bug report
Status

Needs review

Version

2.0

Component

Miscellaneous

Created by

🇧🇪Belgium daften

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @daften
  • Status changed to Needs review almost 2 years ago
  • 🇧🇪Belgium daften

    I contacted Flexmail and they changed the API so it always accepts an array of strings. They just need to fix the error message which is not correct anymore: `{"title":"Bad Request","type":"about:blank","status":400,"detail":"test_veld should be a string or an array with one string"}`

    In attachment a patch that makes sure custom fields work again, together with 2 small changes for checks that should avoid notices in the logs.

Production build 0.71.5 2024