Issue #1509
closedDocuments should have a serializer by default
Description
All Documents should probably have a serializer, so we don't have to constantly check if our models have serializers before using them.
ModelSerializer[0] appears to have a reasonable default behavior for mongoengine models (which makes sense), so AutoRetryDocument[1] should probably use that as its SERIALIZER attribute. Once that's done, we can remove a bunch of hasattr(model, 'SERIALIZER') checks because we've ensured that the model does, in fact, hasattr.
[0]: https://github.com/pulp/pulp/blob/d46a334f745697604125825c827d29dca6c97970/server/pulp/server/webservices/views/serializers/__init__.py#L158
[1]: https://github.com/pulp/pulp/blob/d46a334f745697604125825c827d29dca6c97970/server/pulp/server/db/model/__init__.py#L38
Updated by bmbouter almost 5 years ago
- Status changed from NEW to CLOSED - WONTFIX
Updated by bmbouter almost 5 years ago
Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.