Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a team member fails #380

Open
jamesrkg opened this issue Mar 23, 2020 · 0 comments
Open

Adding a team member fails #380

jamesrkg opened this issue Mar 23, 2020 · 0 comments
Labels
Milestone

Comments

@jamesrkg
Copy link

The below fails using scrunch even though the user_email is definitely known to Crunch. Switching to the UI to add the member there instead succeeds.

>>> team = scrunch.get_team(team_name)
>>> team.members.add(user_email)
KeyErrorTraceback (most recent call last)
<ipython-input-11-ed5ef572543b> in <module>()
      1 inq = scrunch.get_team('Affiliate Poland: Inquiry')
----> 2 inq.members.add('[email protected]')

c:\users\jamesg\documents\techops\dev\scrunch\scrunch\datasets.pyc in add(self, member, edit)
    381         :return: None
    382         """
--> 383         member = self._validate_member(member)
    384         self.resource.members.patch({member.url: {
    385             'permissions': {self._EDIT_ATTRIBUTE: edit}

c:\users\jamesg\documents\techops\dev\scrunch\scrunch\datasets.pyc in _validate_member(self, member)
    365                 member = get_team(member)
    366             except:
--> 367                 raise KeyError('Member %s is not a Team nor a User' % member)
    368         return member
    369 

KeyError: 'Member XXX is not a Team nor a User'
@jamesrkg jamesrkg added the bug label Mar 23, 2020
@jamesrkg jamesrkg added this to the Wishlist milestone Mar 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant