Adding delete_relation_data() function that allows to remove fields from the relation on request.
IT's NOT implemented as part of the update function, given the already existing complexity.
I.e. as we're already "cherry-picking" among input fields ("Is this in a secret?" "Is this in the databag?") we shouldn't further load this logic to even select whether None values may be supplied to indicate removal for real.... Ah, and don't forget to remove the secret if all fields deleted -- otherwise you get an error if saving an empty secret...
Pls, no more spagetti than what we already have :-)
Instead it seems to make more sense to have a clean interface for deletion. If one wants to delete a field, (s)he should do that explicitly. Cleaner interface, cleaner code...
Adding
delete_relation_data()
function that allows to remove fields from the relation on request.IT's NOT implemented as part of the update function, given the already existing complexity. I.e. as we're already "cherry-picking" among input fields ("Is this in a secret?" "Is this in the databag?") we shouldn't further load this logic to even select whether
None
values may be supplied to indicate removal for real.... Ah, and don't forget to remove the secret if all fields deleted -- otherwise you get an error if saving an empty secret... Pls, no more spagetti than what we already have :-)Instead it seems to make more sense to have a clean interface for deletion. If one wants to delete a field, (s)he should do that explicitly. Cleaner interface, cleaner code...