WebHooks now use the ResourceAPIEncoder

Review Request #7822 — Created Dec. 22, 2015 and submitted — Latest diff uploaded

brennie
Review Board
release-2.5.x
4042
reviewboard

Previously, a when uploading a new diff for a review request, if there
were webhooks configured, they would fail to execute because DiffSets
could not be serialized. Now that Djblets supports serialization of
arbitrary Django models, we implement this behaviour for DiffSets so
they can be serialized in web hook payloads (as their diffviewer URL).

Web hooks have been updated to use the ResourceAPIEncoder so if any
model present in a payload is registered with a resource, it will be
serialized accordingly. This should avoid future serialization issues
with web hooks.

  • Ran unit tests.
  • Could not reproduce issue 4042 with this patch applied.
  • The new unit test fails without this patch applied.
Loading...