You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's somewhat difficult to inject custom behavior into the POST and PUT behavior for the RestResource class. The following change might make it easier to do so:
Here are the lines atop the create and edit functions in RestResource:
If these were moved to a separate function and then the data passed to the create and edit functions, it would allow injection of custom behavior based on query params. The custom params could then be popped out of the data dict by the overriding function before calling super to keep the serialization working.
The text was updated successfully, but these errors were encountered:
It may also need the bad response to be handled as an exception which is caught a few levels up. If you like the idea, I can put together a pull request.
It's somewhat difficult to inject custom behavior into the POST and PUT behavior for the RestResource class. The following change might make it easier to do so:
Here are the lines atop the create and edit functions in RestResource:
If these were moved to a separate function and then the data passed to the create and edit functions, it would allow injection of custom behavior based on query params. The custom params could then be popped out of the data dict by the overriding function before calling super to keep the serialization working.
The text was updated successfully, but these errors were encountered: