[Bug] Edit Special Group throws NoMethodError
Steps to Reproduce
- run
rails db:reset
to sanitize the database - navigate to a draw in suite selection mode.
- disband one group of this suite. record the leader of this group
- create a special group of size 1, with the leader being the leader of the newly disbanded group
- attempt to edit this new special group by: checking 2-3 random users and clicking save. (need not change size, leader, or # of transfer students fields, and these need not be valid)
Result: Should encounter a NoMethodError in DrawlessGroupsController#update
undefined method `remove_draw' for nil:NilClass
Extracted source (around line # 24):
# Note that this occurs within the transaction
def update_added_user(user)
user.draw_membership.remove_draw.update!(intent: 'on_campus')
end
def success
Edited by Kevin Tang