DirectorObjectForm: fix exception on groupless objects

This commit is contained in:
Thomas Gelf 2015-06-17 10:02:29 +02:00
parent 616892984d
commit 774174052a
1 changed files with 3 additions and 2 deletions

View File

@ -16,7 +16,7 @@ abstract class DirectorObjectForm extends QuickForm
{
$values = $this->getValues();
if ($this->object->supportsGroups()) {
if (array_key_exists('group', $values)) {
unset($values['groups']);
}
@ -31,7 +31,8 @@ abstract class DirectorObjectForm extends QuickForm
);
} else {
$class = $this->getObjectClassname();
$this->object = $class::create($values)->store($this->db);
$this->object = $class::create($values);
$this->object->store($this->db);
$this->storeGroupMembership();
$this->redirectOnSuccess(
sprintf(