Skip to content

Commit

Permalink
Merge pull request #16917 from colemanw/domainId2
Browse files Browse the repository at this point in the history
APIv4 - Only adjust domain_id if required
  • Loading branch information
seamuslee001 authored Mar 27, 2020
2 parents ad85782 + 6f6d5bc commit 0597447
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class FieldDomainIdSpecProvider implements Generic\SpecProviderInterface {
*/
public function modifySpec(RequestSpec $spec) {
$domainIdField = $spec->getFieldByName('domain_id');
if ($domainIdField) {
if ($domainIdField && $domainIdField->isRequired()) {
$domainIdField->setRequired(FALSE)->setDefaultValue('current_domain');;
}
}
Expand Down

0 comments on commit 0597447

Please sign in to comment.