|
@@ -38,7 +38,7 @@ class DeviceValidator extends ConstraintValidator
|
|
|
{
|
|
|
$result = $this->webservice->makeGetRequest($this->deviceCheckUrl);
|
|
|
$data = json_decode($result, true);
|
|
|
- if (isset($data['result']) && $data['result'] == false) {
|
|
|
+ if (is_null($entity->getId()) && isset($data['result']) && $data['result'] == false) {
|
|
|
$this->context->buildViolation($constraint->message)
|
|
|
->addViolation();
|
|
|
}
|