How can I delete a RelationValue from a dx content type object?


I have an object and there is a relation set to another object. I used a Relation Choice field in dexterity.
How can I remove the relation using code so that I would be able to delete the related object?

My current code looks like:

    obj = brain.getObject()
    obj.rel = None

This seems to work, but I was wondering if there is a better way.


This looks fine.

1 Like