[PATCH 1/2] REST: Don't error if a versioned field we would remove is absent

Stephen Finucane stephen at that.guru
Sat Aug 21 07:58:56 AEST 2021


On Sat, 2021-08-21 at 00:57 +1000, Daniel Axtens wrote:
> We remove fields that shouldn't be seen on old versions of the API.
> This was done with `pop(field name)`, which will throw an exception
> if the named field is absent from the data. However, sometimes if
> a patch request is via an old API version, we hit this line without
> ever having the field present.
> 
> This is odd, but not harmful and we definitely shouldn't 500.
> 
> Fixes: d944f17ec059 ("REST: Use versioning for modified responses")
> Signed-off-by: Daniel Axtens <dja at axtens.net>

Looks good to me.

Reviewed-by: Stephen Finucane <stephen at that.guru>

I squashed the test into this (with a tweak in the name) and applied it.

Thanks!

Stephen



More information about the Patchwork mailing list