Skip to content
Snippets Groups Projects
Commit efc71fab authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #1839 from greezybacon/oops/api-custom-data


oops: Fix dropped custom data from API requests

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents fcd7b301 df5ff0b0
No related branches found
No related tags found
No related merge requests found
......@@ -735,7 +735,6 @@ class DynamicFormEntry extends VerySimpleModel {
// Get all dynamic fields associated with the form
// even when stored elsewhere -- important during validation
foreach ($this->getForm()->getDynamicFields() as $field) {
$field->setForm($this);
$field = $field->getImpl($field);
if ($field instanceof ThreadEntryField)
continue;
......@@ -744,13 +743,11 @@ class DynamicFormEntry extends VerySimpleModel {
// Get answers to entries
foreach ($this->getAnswers() as $a) {
if (!($f = $a->getField())) continue;
// Perhaps an answer of deleted field
if (!isset($this->_fields[$f->get('id')])) {
$f->setForm($this);
}
$this->_fields[$f->get('id')] = $f;
}
}
foreach ($this->_fields as $F)
$F->setForm($this);
return $this->_fields;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment