]> git.agnieray.net Git - galette.git/commitdiff
Wrong parent set on member storage; fixes #1443
authorJohan Cwiklinski <johan@x-tnd.be>
Sun, 21 Jun 2020 06:35:38 +0000 (08:35 +0200)
committerJohan Cwiklinski <johan@x-tnd.be>
Sun, 21 Jun 2020 06:35:38 +0000 (08:35 +0200)
galette/lib/Galette/Entity/Adherent.php

index 73fdf2a78fd7105f7767aac393c02f06a5050f4e..fe9c2fdbf665ce1c0a4f9e05521e07ef4df4cde1 100644 (file)
@@ -1336,7 +1336,7 @@ class Adherent
                 }
                 break;
             case 'parent_id':
-                $this->$prop = (int)$value;
+                $this->$prop = ($value instanceof Adherent) ? (int)$value->id : (int)$value;
                 $this->loadParent();
                 break;
         }