AC-688 Fixed error adding team credential, added test.

This commit is contained in:
Chris Church
2013-11-20 16:48:57 -05:00
parent 9f40a6c8b4
commit 4f46ad63db
3 changed files with 19 additions and 5 deletions

View File

@@ -746,7 +746,6 @@ class PermissionSerializer(BaseSerializer):
res['inventory'] = reverse('api:inventory_detail', args=(obj.inventory.pk,))
return res
def validate(self, attrs):
# Can only set either user or team.
if attrs['user'] and attrs['team']: