Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
REST: Don't error if a versioned field we would remove is absent
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. Signed-off-by: Daniel Axtens <dja@axtens.net> [stephenfin: Merge test into bug fix] Signed-off-by: Stephen Finucane <stephen@that.guru> Tested-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org> Fixes: d944f17 ("REST: Use versioning for modified responses") Closes: #423 (cherry picked from commit 5c22f9d) (cherry picked from commit 956f988)
- Loading branch information