nerves-hub / nerves_hub_web

Manage firmware updates for Nerves devices
https://nerves-hub.org/
Apache License 2.0
175 stars 63 forks source link

Error when rescinding already accepted invites #1353

Closed beltranaceves closed 1 week ago

beltranaceves commented 1 week ago

Describe the bug When rescinding an org invite that has already been accepted, an error occurs FunctionClauseError at DELETE /org/nerveshub/settings/invite/

To Reproduce Steps to reproduce the behavior:

  1. Go to '/org//settings/users'
  2. Click on 'Add new user'
  3. Create and send user invite
  4. Go back to '/org//settings/users'
  5. Open anonymous tab and accept invite
  6. Back on the original tab, without refreshing the page in '/org//settings/users', click on 'Rescing'

Expected behavior A small error popup shows up saying the user has already accepted the invite and the 'Rescind' button disappears

image

joshk commented 1 week ago

Thanks for the report.

I've just pushed a PR for review which fixes this.