Unverified Commit 0597447f authored by Seamus Lee's avatar Seamus Lee Committed by GitHub

Merge pull request #16917 from colemanw/domainId2

APIv4 - Only adjust domain_id if required
parents ad857826 6f6d5bcd
...@@ -30,7 +30,7 @@ class FieldDomainIdSpecProvider implements Generic\SpecProviderInterface { ...@@ -30,7 +30,7 @@ class FieldDomainIdSpecProvider implements Generic\SpecProviderInterface {
*/ */
public function modifySpec(RequestSpec $spec) { public function modifySpec(RequestSpec $spec) {
$domainIdField = $spec->getFieldByName('domain_id'); $domainIdField = $spec->getFieldByName('domain_id');
if ($domainIdField) { if ($domainIdField && $domainIdField->isRequired()) {
$domainIdField->setRequired(FALSE)->setDefaultValue('current_domain');; $domainIdField->setRequired(FALSE)->setDefaultValue('current_domain');;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment