Skip to content

Commit

Permalink
fix(decision): inconsistency in (sub)decision model with GEWISDB
Browse files Browse the repository at this point in the history
Somehow the possibility for these to be `null` got lost somewhere.
  • Loading branch information
tomudding committed Nov 9, 2024
1 parent 3e62e23 commit d7c4841
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion module/Decision/src/Model/Decision.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Decision\Model\Enums\MeetingTypes;
use Decision\Model\SubDecision\Annulment;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\Entity;
Expand Down Expand Up @@ -52,6 +53,7 @@ class Decision
enumType: MeetingTypes::class,
)]
protected MeetingTypes $meeting_type;

/**
* Meeting number.
*
Expand Down Expand Up @@ -103,7 +105,12 @@ enumType: MeetingTypes::class,
targetEntity: Annulment::class,
mappedBy: 'target',
)]
protected Annulment $annulledBy;
protected ?Annulment $annulledBy = null;

public function __construct()
{
$this->subdecisions = new ArrayCollection();
}

/**
* Set the meeting.
Expand Down
4 changes: 2 additions & 2 deletions module/Decision/src/Model/SubDecision/Installation.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Installation extends FoundationReference
targetEntity: Discharge::class,
mappedBy: 'installation',
)]
protected Discharge $discharge;
protected ?Discharge $discharge = null;

/**
* The organmember reference.
Expand Down Expand Up @@ -114,7 +114,7 @@ public function getReappointments(): Collection
/**
* Get the discharge, if it exists.
*/
public function getDischarge(): Discharge
public function getDischarge(): ?Discharge
{
return $this->discharge;
}
Expand Down

0 comments on commit d7c4841

Please sign in to comment.