I am attempting to get the review request by using the following as you
stated in your email:
but it failed for me with the same AttributeError as in this thread.
However, when I tried the other approach in your mail, it works fine.
The following works:
self.review_request_id = id
self.review_request = self.root.get_review_requests().get_item(id)
This one doesnt:
self.review_request_id = id
File ".../common/interface.py", line 95, in set_review_id
File ".../rbtools/api/resource.py", line 273, in __getattr__
I tried get_diffs() as well and that is also failing with the same error.
Is there something I need to do differently?
On Tuesday, 21 May 2013 00:37:08 UTC+5:30, Steven MacLeod wrote:
> 'root.get_review_requests().get_self(id='15583', repository=repository)'
> will result in a
> "GET http://.../api/review_requests/?id=15583&repository=<id>"
> What you're looking for is 'root.get_review_requests().get_item(15583)',
> or alternatively 'root.get_review_request(review_request_id=15583). The
> former traverses the tree of resources, while the latter uses the root
> resource's uri-template for 'review-request'.
> Additionally, retrieving the id of the repository is unnecessary to find
> the review request with the ID you are looking for.
> > wrote:
>> I've been trying to following the documentation here:
>> To create a review for a existing review request, and then add a comment
>> to the review. Unfortunately I'm not getting far.
>> I've tried the following:
>> root = client.get_root()
>> repos = root.get_repositories()
>> if repos.num_items < 1:
>> raise Exception('No valid repositories.')
>> repository = repos.id
>> review_request = root.get_review_requests().get_self(id='15583',
>> review = review_request.get_reviews().create()
>> filediff_id = review.get_diffs().get_files().id
>> text='This is a diff comment!')
>> review.update(body_top='Test Review Comment - please ignore', public=True)
>> I get the error: AttributeError: 'ResourceList' object has no attribute
>> So it looks like root.get_review_requests().get_self(id='15583',
>> repository=repository) isn't the right request to return an existing review
>> request ?
>> Any help would be much appreciated.
>> Want to help the Review Board project? Donate today at
>> Happy user? Let us know at http://www.reviewboard.org/users/
>> To unsubscribe from this group, send email to
>> For more options, visit this group at
>> You received this message because you are subscribed to the Google Groups
>> "reviewboard" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> For more options, visit https://groups.google.com/groups/opt_out.
Want to help the Review Board project? Donate today at
Happy user? Let us know at http://www.reviewboard.org/users/
To unsubscribe from this group, send email to
For more options, visit this group at
You received this message because you are subscribed to the Google Groups
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/groups/opt_out.