VRFS-1891 cancel RSVP flow fix
This commit is contained in:
parent
fd9893ca42
commit
cc26969f8a
|
|
@ -100,9 +100,10 @@ module JamRuby
|
|||
# verify user has not already submitted RSVP request for this slot
|
||||
rsvp = RsvpRequest.joins(:rsvp_requests_rsvp_slots)
|
||||
.where(:user_id => user.id)
|
||||
.where(:canceled => false)
|
||||
.where(rsvp_requests_rsvp_slots: {rsvp_slot_id: id})
|
||||
|
||||
if !rsvp.blank? && !rsvp.canceled
|
||||
if !rsvp.blank?
|
||||
raise StateError, "You have already submitted an RSVP request for this slot."
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue