Skip to content

Commit

Permalink
contributions take 'contributor_id' - this fixes #11
Browse files Browse the repository at this point in the history
  • Loading branch information
jellegerbrandy committed Apr 19, 2016
1 parent 8ca8880 commit 5c6df64
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion restapi/tests/test_contributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_workflow(self):
user = self.contract.create_user()

# create a contribution
response = app.post(self.url_collection, {'user_id': user.id})
response = app.post(self.url_collection, {'contributor_id': user.id})
self.assertEqual(response.json['contributor']['id'], user.id)
contribution_id = response.json['id']

Expand Down
2 changes: 1 addition & 1 deletion restapi/views/contributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def collection_post(request):
:returns: information about the new contribution
"""
user_id = request.POST['user_id']
user_id = request.POST['contributor_id']
user = request.contract.get_user(user_id)
contribution = request.contract.create_contribution(user=user)
return contribution_to_dict(contribution, request)
Expand Down

0 comments on commit 5c6df64

Please sign in to comment.