Merge pull request #904 from Valandur/feature/fix-submittedform-cancreate

fix(submitted-form): canCreate not checking parent
This commit is contained in:
Dylan Wagstaff 2019-09-09 14:08:28 +12:00 committed by GitHub
commit a01692153c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -1,5 +1,7 @@
language: php
dist: trusty
env:
global:
- COMPOSER_ROOT_VERSION=5.0.x-dev

View File

@ -130,7 +130,12 @@ class SubmittedForm extends DataObject
if ($extended !== null) {
return $extended;
}
return $this->Parent()->canCreate();
if ($this->Parent()) {
return $this->Parent()->canCreate($member);
}
return parent::canCreate($member);
}
/**