فهرست منبع

fix 'organization not set' bug

Olivier Massot 8 ماه پیش
والد
کامیت
759abd4be6
1فایلهای تغییر یافته به همراه3 افزوده شده و 5 حذف شده
  1. 3 5
      src/Entity/Organization/Organization.php

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

@@ -527,12 +527,10 @@ class Organization
 
     public function setSettings(Settings $settings): self
     {
-        // set the owning side of the relation if necessary
-        if ($settings->getOrganization() !== $this) {
-            $settings->setOrganization($this);
-        }
-
         $this->settings = $settings;
+        
+        // set the owning side of the relation
+        $settings->setOrganization($this);
 
         return $this;
     }