Skip to content

Commit

Permalink
Fixed a schema error when type in multiple groups (EZP-30419)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bertrand Dunogier committed Apr 9, 2019
1 parent 23d46eb commit 251cb53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ public function canWork(Builder $schema, array $args)
{
return isset($args['ContentType'])
&& $args['ContentType'] instanceof ContentType
&& !isset($args['FieldDefinition']);
&& !isset($args['FieldDefinition'])
&& !$schema->hasType($this->getCreateInputName($args['ContentType']));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ public function canWork(Builder $schema, array $args): bool
isset($args['ContentType'])
&& $args['ContentType'] instanceof ContentType
&& isset($args['FieldDefinition'])
&& $args['FieldDefinition'] instanceof FieldDefinition;
&& $args['FieldDefinition'] instanceof FieldDefinition
&& !$schema->hasTypeWithField($this->getCreateInputName($args['ContentType']), $this->getFieldDefinitionField($args['FieldDefinition']));
}

/**
Expand Down

0 comments on commit 251cb53

Please sign in to comment.