Skip to content

Commit

Permalink
updating with master
Browse files Browse the repository at this point in the history
  • Loading branch information
alliyya committed Nov 27, 2018
2 parents 67d9dc6 + ade3341 commit 161e111
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions api/src/mutations/seminar.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,13 @@ async function updateSeminarParticipation(
seminarid
);

if (!(await isAttendingEvent(userid, event_id))) {
return new Error("User must be attending event of this seminar");
}

if (participationType.toUpperCase() == "ATTENDING") {
// throws if error user already attending when trying to add to a seminar
if (adding) {
await alreadyAttendingSeminar(userid, seminarid);
if (!(await isAttendingEvent(userid, event_id))) {
return new Error("User must be attending event of this seminar");
}
}
// Checking if user can be added to event or should be added to waitlist
if (max_capacity && current_capacity == max_capacity && adding) {
Expand Down

0 comments on commit 161e111

Please sign in to comment.