When importing concepts, the locale_preferred is saved as false if using either true or false boolean values. However, it is saved as true if instead locale_preferred is set as a non-empty string that evaluates to true.
For example, I imported this:
{"datatype": "N/A", "concept_class": "Locale", "id": "abk", "names": [{"locale": "en", "locale_preferred": true, "name_type": "Fully Specified", "name": "Abkhazian"}, {"locale": "fr", "locale_preferred": true, "name_type": "Fully Specified", "name": "abkhaze"}, {"locale": "en", "locale_preferred": false, "name_type": "ISO 639-2", "name": "abk"}, {"locale": "en", "locale_preferred": false, "name_type": "ISO 639-1", "name": "ab"}]}
The import script debug output shows that locale_preferred is set correctly:
Adding new concept: {u'datatype': u'N/A', u'concept_class': u'Locale', u'id': u'ace', u'names': [{u'locale': u'en', u'locale_preferred': True, u'name_type': u'Fully Specified', u'name': u'Achinese'}, {u'locale': u'fr', u'locale_preferred': True, u'name_type': u'Fully Specified', u'name': u'aceh'}, {u'locale': u'en', u'locale_preferred': False, u'name_type': u'ISO 639-2', u'name': u'ace'}]}
But after creating the new concept, all locale_preferred fields are set to False. The same exact behavior occurs when doing an update.
However, if I instead change the true values to "locale_preferred":"True" (which evaluates to a boolean true), then it works fine. This is the short-term fix that I'm using so that I can continue importing content, but is still a bug that needs to be fixed.
When importing concepts, the locale_preferred is saved as false if using either true or false boolean values. However, it is saved as true if instead locale_preferred is set as a non-empty string that evaluates to true.
For example, I imported this:
The import script debug output shows that locale_preferred is set correctly:
But after creating the new concept, all locale_preferred fields are set to False. The same exact behavior occurs when doing an update.
However, if I instead change the true values to "locale_preferred":"True" (which evaluates to a boolean true), then it works fine. This is the short-term fix that I'm using so that I can continue importing content, but is still a bug that needs to be fixed.