Skip to content

Commit ac44af7

Browse files
committed
chore: fix on candidate profile saving
1 parent 404d652 commit ac44af7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

app/Models/Foundation/Elections/Candidate.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function __construct(Member $member, Election $election)
107107
$this->nominations = new ArrayCollection();
108108
$this->member = $member;
109109
if(!$member->isIndividualMember())
110-
throw new ValidationException("Invalid Candidate.");
110+
throw new ValidationException("Candidate is not valid.");
111111

112112
$this->election = $election;
113113
$this->relationship_to_openstack = null;
@@ -294,4 +294,4 @@ public function setBio(string $bio): void
294294
$this->bio = $bio;
295295
$this->checkIfHasAcceptedNomination();
296296
}
297-
}
297+
}

app/Services/Model/Imp/ElectionService.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ public function updateCandidateProfile(Member $candidate, Election $election, ar
5656
{
5757
return $this->tx_service->transaction(function() use($candidate, $election, $payload){
5858

59-
if(!$candidate->isFoundationMember())
59+
if(!$candidate->isIndividualMember())
6060
throw new ValidationException("Candidate is not valid.");
6161

6262
$candidateProfile = $election->getCandidancyFor($candidate);
6363

6464
if(!$election->isNominationsOpen() && !is_null($candidateProfile) && !$candidateProfile->isGoldMember()){
65-
throw new ValidationException("Eleciton Nominations are closed.");
65+
throw new ValidationException("Election Nominations are closed.");
6666
}
6767

6868
if(!$election->isOpen()){
@@ -107,4 +107,4 @@ public function nominateCandidate(Member $nominator, int $candidate_id, Election
107107
NominationEmail::dispatch($election, $nomination->getCandidate());
108108
return $nomination;
109109
}
110-
}
110+
}

0 commit comments

Comments
 (0)