Skip to content
Snippets Groups Projects
Commit 948af0ea authored by Jared Hancock's avatar Jared Hancock
Browse files

oops: Fix mapping of abbreviation to list selection on API

parent 0ee6dac1
No related branches found
No related tags found
No related merge requests found
...@@ -1660,7 +1660,13 @@ class SelectionField extends FormField { ...@@ -1660,7 +1660,13 @@ class SelectionField extends FormField {
return array($i=>$choices[$i]); return array($i=>$choices[$i]);
// Query the store by value or extra (abbrv.) // Query the store by value or extra (abbrv.)
if (($list=$this->getList()) && ($i=$list->getItem($value))) if (!($list=$this->getList()))
return null;
if ($i = $list->getItem($value))
return array($i->getId() => $i->getValue());
if ($i = $list->getItem($value, true))
return array($i->getId() => $i->getValue()); return array($i->getId() => $i->getValue());
return null; return null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment