I would prefer to see all the preparation as part of the validate
method of a serializer and the actual database 'changes' done in its
'create'.
My experience with https://pulp.plan.io/issues/4394 tells me that
Django Rest Framework is really built around those, and that they
provide the correct Documentation, too.

On Tue, 19 Feb 2019 12:30:22 -0500
Brian Bouterse <[email protected]> wrote:

> In terms of implementing (b) I believe it would be useful to have a
> Content unit provide an optional class method that will instantiate a
> content unit (but not save it) from an Artifact. Then core can offer
> an API that accepts a single Artifact binary and what content unit
> type it is and it should create+save the Artifact and then
> create+save the Content unit from that Artifact.

Attachment: pgpHJ87sHtMip.pgp
Description: OpenPGP digital signature

_______________________________________________
Pulp-dev mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/pulp-dev

Reply via email to