Commit 6f6d5bcd authored by colemanw's avatar colemanw

APIv4 - Only adjust domain_id if required

parent 41e15616
......@@ -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');;
}
}
......
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