Skip to content

Commit

Permalink
Fix sending parallel mutation requests cause 500 internal server erro…
Browse files Browse the repository at this point in the history
…r - resolves #793
  • Loading branch information
dvesh3 committed Nov 6, 2023
1 parent 1f7f883 commit 7ac4174
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function __construct($type, $path, $name = null, $configuration = null)
$this->setType($type);
$this->setPath($path);
$this->setName($name);
$this->setConfiguration($configuration ?? []);
$this->setConfiguration($configuration);
}

public function getObjectVars(): array
Expand Down Expand Up @@ -148,12 +148,10 @@ public function setType(string $type): void
*/
public function setConfiguration($configuration): void
{
if (is_array($configuration)) {
$configuration = json_decode(json_encode($configuration), true);
}
if (empty($this->getName())) {
if ($configuration && empty($this->getName())) {
$this->setName($configuration['configuration']['general']['name'] ?? null);
}

$this->configuration = $configuration;
}

Expand Down

0 comments on commit 7ac4174

Please sign in to comment.