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

REST API tests for GET jobs + GET jobs/ID/annotations #4295

Merged
merged 10 commits into from
Feb 11, 2022
7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,10 @@
"name": "cvat",
"database": "${workspaceFolder:cvat}/db.sqlite3"
}
]
],
"python.testing.pytestArgs": [
"tests"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}
3 changes: 2 additions & 1 deletion cvat/apps/organizations/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ def create(self, validated_data):
f'with {membership_data["user"]["email"]} email. It is not '
f'a valid email in the system.')

membership, created = Membership.objects.get_or_create(**membership_data,
membership, created = Membership.objects.get_or_create(
defaults=membership_data,
user=user, organization=organization)
if not created:
raise serializers.ValidationError('The user is a member of '
Expand Down
Loading