Code review comment for lp:~aaronp/rnr-server/get-usefulness-by-user

Revision history for this message
Aaron Peachey (aaronp) wrote :

btw - correct, re the get_String left in. I had issues with the computer that my server was set up on so was feeling my way around for the second patch. Running the test just now confirmed that it was incorrect, and also that data=data was incorrect.

Here's the correct diff, 3rd time lucky:

34c34
<
---
>
150,166d149
< @validate('review_id', int, required=False)
< @validate_pattern('username', r'[^\n]+', required=False)
< @returns_json
< def get_usefulness(self, review_id=None, username=None):
< """Get a list of usefulness filtered by username/review_id"""
< if not username and not review_id:
< return None
<
< data = {}
<
< if username:
< data['username'] = username
< if review_id:
< data['review_id'] = str(review_id)
<
< return self._get('/usefulness', args=data,
< scheme=PUBLIC_API_SCHEME)

« Back to merge proposal