Merge pull request #679 from creative-commoners/pulls/5.0/fix-polymorphic-parent

FIX Polymorphic has_one needs parent class name set
This commit is contained in:
Dylan Wagstaff 2017-10-26 15:54:17 +13:00 committed by GitHub
commit 8f320e65ef
1 changed files with 1 additions and 0 deletions

View File

@ -205,6 +205,7 @@ JS
{
$submittedForm = SubmittedForm::create();
$submittedForm->SubmittedByID = Security::getCurrentUser() ? Security::getCurrentUser()->ID : 0;
$submittedForm->ParentClass = get_class($this->data());
$submittedForm->ParentID = $this->ID;
// if saving is not disabled save now to generate the ID