Skip to content

MultipleObjectsReturned error when multiple pick list items exist with the same text in different case #3897

Description

@grantfitzsimmons

Lucas De Cicco in KU ornithology just reported this error to me that he is getting during validation of a dataset in the workbench in KU bird database. The dataset name is specify.upload.2023.Aug.2 (2). Any ideas? He has uploaded multiple other datasets to the mammal database without any issues so this appears to be database specific.

image

Here's the full taskinfo response for context:

  "taskinfo": "MultipleObjectsReturned('get() returned more than one Picklistitem -- it returned 3!')"

Main Issue

The issue is that the WorkBench assumes picklistitem values are case insensitive, though this pick list has both a lowercase G and uppercase G as options. Once you remove either one, it works correctly.

This was discovered in the KU Birds database.

How it was discovered

This issue was caused by the field text12 in the Collection Object Attribute table. The column heading is "WeightUnits", and it has this picklist assigned to that field.

problematic_mapping.json.zip

Here is what the pick list looked like before:
image
PickList_SQL.csv

Solution

Once you remove one of the pick list items (either g or G), you can proceed.

Reported By: KU Birds

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

1 - BugIncorrect behavior of the product2 - WorkBenchIssues that are related to the WorkBench

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions