ManchesterMakerspace / makerspace-rails

Ruby on Rails server for makerspace management
2 stars 0 forks source link

Card handling should correctly deal with one member having multiple cards in the "cards" collection #239

Open pinesec opened 1 year ago

pinesec commented 1 year ago

Normally a "member" has one single card in the table “cards”, sometimes may have multiple cards in the database (usually several “lost” cards and one working card)

For all operations updating the card(s) for a member_id,, functions need to correctly handle updating multiple cards matching the member_id to reflect a change in user expiry, validity, or holder, but preserve any "lost" or "stolen" status on each card.