Correctly serialize review requests with only-fields

Review Request #1390 — Created Sept. 26, 2018 and updated

guest2646
Review Board
demo
guest2646
If the `dvcs_feature` is disabled and a request is made to the review
request WebAPI resource with the `only-fields/only_fields` query/post
parameter set to a subset of fields that does not include the
`created_with_history` field, the server would raise an exception and
return a HTTP 500. This was because the field was already excluded from
the set of serialized fields.

We now are more defensive about removing this field so as not to raise a
`KeyError` if the field is not in the dictionary.

Testing Done:
Ran unit tests.

Reviewed at https://reviews.reviewboard.org/r/10169/


Description From Last Updated

jjjj;

guest2646guest2646

Test it

guest6103guest6103

some tests might break for because of a critical run

guest6100guest6100

verify???

guest2727guest2727

Add more documentation

guest6698guest6698

can't use ??

guest2646guest2646

What is this?

guest2940guest2940
guest2646
  1. it's fine

  2. 
      
guest2646
  1. Ship It!
  2. 
      
guest2646
  1. 
      
  2. 
      
guest2646
guest2646
guest2646
guest2646
Review request changed

Status: Re-opened

guest2646
guest6282
  1. ghjghj

  2. 
      
guest5888
  1. Inviala!
  2. 
      
guest2727
  1. Ship It!

  2. 
      
guest2727
guest8435
  1. Ship It!
  2. 
      
guest2940
  1. 
      
  2. reviewboard/webapi/tests/test_review_request.py (Diff revision 1)
     
     
     
     

    What is this?

  3. 
      
guest8386
  1. Example of review board

  2. 
      
guest6698
  1. 
      
  2. Add more documentation

  3. Can you please explain why this is used?

  4. 
      
guest6103
  1. Ship It!
  2. 
      
guest6103
  1. 
      
  2. Test it

  3. 
      
guest6100
  1. 
      
  2. this should be fully covered by tests

  3. some tests might break for because of a critical run

  4. this is a comment

  5. 
      
Loading...