django-webhook icon indicating copy to clipboard operation
django-webhook copied to clipboard

`FieldFile is not JSON serializable` Error & custom object serialization

Open Nosudrum opened this issue 1 year ago • 15 comments

Hi there,

I have just installed this lib to try it out on a fairly large & complex Django project, and have encountered the following error when saving an object with a FileField

Object of type FieldFile is not JSON serializable

This leads me to the following questions:

  • This field type does not seem supported, what is the way forward ?
  • Is there a way to customize the serializer used in the webhook on a per-model basis ? Ideally I'd like to point towards the retrieve serializers used on the endpoints.
  • Is it possible to ensure that a webhook is only triggered when a field has changed, and not just on save ?

Any help is greatly appreciated :)

Nosudrum avatar Jul 27 '24 17:07 Nosudrum