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

Fixes #263 #286

Merged
merged 2 commits into from
Jun 29, 2016
Merged

Fixes #263 #286

merged 2 commits into from
Jun 29, 2016

Conversation

seav
Copy link
Contributor

@seav seav commented Jun 29, 2016

This PR contains the following changes:

  • Modified the add org member form to check if the user is already a member of the org
  • Added a unit test for this check
  • Modified a functional test for this check

if num_roles != 0:
raise forms.ValidationError(
_("User is already a member of the organization."),
code='member_already')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use OrganizationRole.objects.filter(user=self.user, organization=self.organization).exists() instead of count()

@oliverroick oliverroick merged commit b12cf23 into master Jun 29, 2016
@oliverroick oliverroick deleted the bugfix/263 branch June 29, 2016 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants