Re: API+rbtools: Only changing extra_data won't save

2021-05-20 Thread tw bert
Hi Christian, "It should just instantly be in there." -> correct ! It was just missing knowledge on our part, messing around with draft was not necessary. For future reference: requests=root.get_review_requests(commit_id='FOO_BAR') if len(requests) != 1: raise ValueError('revreq with

Re: API+rbtools: Only changing extra_data won't save

2021-05-19 Thread Christian Hammond
Thanks! It should just instantly be in there. What does the resulting payload from the API call look like? Any changes showing up in extra_data? Christian On Wed, May 19, 2021 at 4:08 AM tw bert wrote: > Hi Christian, congrats on the RB4 release! > > We don't have a RB extension, we only want

Re: API+rbtools: Only changing extra_data won't save

2021-05-19 Thread tw bert
Hi Christian, congrats on the RB4 release! We don't have a RB extension, we only want to store some custom data in extra_data. You mention that it's possible to *not* use a draft in this scenario, and that's fine. But I must be missing something (probably simple). After:

Re: API+rbtools: Only changing extra_data won't save

2021-05-19 Thread Christian Hammond
Hi, This is a server-side issue. Review request drafts need to have a field with changed content in order to publish. Is your extra_data backed by a custom field provided by an extension? If you’re just looking to add arbitrary metadata to the review request, you should be able to attach it to

API+rbtools: Only changing extra_data won't save

2021-05-17 Thread tw bert
When doing the following change: draft = revreq.get_or_create_draft() revreq.update(**{'extra_data:json' : json.dumps({'my_dummy_extra_data':'Hello World' },indent=2,ensure_ascii=False)}) draft.update(public=True) We get the following response: rbtools.api.errors.BadRequestError: You