Browse Source

fix preferences ID avec compte famille

Vincent 11 months ago
parent
commit
2ff9238166
1 changed files with 4 additions and 3 deletions
  1. 4 3
      src/Service/Access/AccessProfileCreator.php

+ 4 - 3
src/Service/Access/AccessProfileCreator.php

@@ -86,7 +86,9 @@ class AccessProfileCreator
             ->setIsPayor(
             ->setIsPayor(
                 !$access->getBillingPayers()->isEmpty()
                 !$access->getBillingPayers()->isEmpty()
                 || ($access->getBillingReceivers()->isEmpty() && $access->getChildren()->isEmpty() && !$access->getAccessIntangibles()->isEmpty())
                 || ($access->getBillingReceivers()->isEmpty() && $access->getChildren()->isEmpty() && !$access->getAccessIntangibles()->isEmpty())
-            );
+            )
+            ->setPreferencesId($access->getPreferences()->getId())
+        ;
     }
     }
 
 
     /**
     /**
@@ -108,8 +110,7 @@ class AccessProfileCreator
             ->setIsSuperAdminAccess($access->getSuperAdminAccess())
             ->setIsSuperAdminAccess($access->getSuperAdminAccess())
             ->setOrganization(
             ->setOrganization(
                 $this->organizationProfileCreator->createLightOrganizationProfile($access->getOrganization())
                 $this->organizationProfileCreator->createLightOrganizationProfile($access->getOrganization())
-            )
-            ->setPreferencesId($access->getPreferences()->getId());
+            );
     }
     }
 
 
     /**
     /**