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

Add API for creating Assessments #862

Merged
merged 10 commits into from
Jul 27, 2023
1 change: 0 additions & 1 deletion hawc/apps/assessment/api/viewsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ def get_queryset(self):


class Assessment(AssessmentEditViewSet):
http_method_names = METHODS_NO_PUT
Copy link
Owner

Choose a reason for hiding this comment

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

I removed this; it was already in the parent class

model = models.Assessment
serializer_class = serializers.AssessmentSerializer
assessment_filter_args = "id"
Expand Down
7 changes: 4 additions & 3 deletions tests/hawc/apps/assessment/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,10 @@ def test_permissions(self, db_keys):
"noel_name": 0,
"rob_name": 0,
"editable": "on",
"project_manager": ["2"],
"team_members": ["1", "2"],
"reviewers": ["1"],
"creator": 1,
Copy link
Owner

Choose a reason for hiding this comment

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

changed from strings to ints

"project_manager": [2],
"team_members": [1, 2],
"reviewers": [1],
"epi_version": 1,
"dtxsids_ids": ["DTXSID7020970"],
}
Expand Down