Right now, zero error handling is done when we invoke this method. There are probably a lot of ways we could go about this, but building in handling of validation error (and also returning the results of that error, if there are any), allows users of this feature to use fairly standard Django practices to validate their object before saving and have that be understood by the autocomplete view. One example of how to do this is given in the updated testapp code.
Right now, zero error handling is done when we invoke this method. There are probably a lot of ways we could go about this, but building in handling of validation error (and also returning the results of that error, if there are any), allows users of this feature to use fairly standard Django practices to validate their object before saving and have that be understood by the autocomplete view. One example of how to do this is given in the updated
testapp
code.Fixes https://github.com/wagtail/wagtail-autocomplete/issues/134