Olivier Massot hai 1 ano
pai
achega
e65c515c02

+ 5 - 5
src/Entity/Organization/OrganizationIdentification.php

@@ -58,7 +58,7 @@ class OrganizationIdentification
     private ?string $streetAddressThird;
 
     #[ORM\Column]
-    private ?string $city;
+    private ?string $addressCity;
 
     #[ORM\Column]
     private ?string $postalCode;
@@ -146,14 +146,14 @@ class OrganizationIdentification
         return $this;
     }
 
-    public function getCity(): ?string
+    public function getAddressCity(): ?string
     {
-        return $this->city;
+        return $this->addressCity;
     }
 
-    public function setCity(?string $city): self
+    public function setAddressCity(?string $addressCity): self
     {
-        $this->city = $city;
+        $this->addressCity = $addressCity;
         return $this;
     }
 

+ 3 - 3
src/Service/Organization/OrganizationFactory.php

@@ -206,7 +206,7 @@ class OrganizationFactory
 
         if (
             $this->organizationIdentificationRepository->findOneBy(
-                ['normalizedName' => $normalizedName, 'city' => $organizationCreationRequest->getCity()]
+                ['normalizedName' => $normalizedName, 'addressCity' => $organizationCreationRequest->getCity()]
             )
         ) {
             throw new \RuntimeException(
@@ -224,8 +224,8 @@ class OrganizationFactory
         if (
             $this->organizationIdentificationRepository->findOneBy(
                 [
-                    'address' => $address,
-                    'city' => $organizationCreationRequest->getCity(),
+                    'normalizedAddress' => $address,
+                    'addressCity' => $organizationCreationRequest->getCity(),
                     'postalCode' => $organizationCreationRequest->getPostalCode()
                 ]
             )