Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to replace nested value by deleting it(prev nested obj) #310

Open
yezyilomo opened this issue Jun 26, 2023 · 0 comments
Open

Comments

@yezyilomo
Copy link
Owner

Add option to delete previous value(Obj) of a nested field if the new value is None. i.e

If obj.field == obj1

Then we do obj.field = None

Then what do we do to the obj1?

Currently it remains unaltered, but there’re scenarios where if you replace it with None you won’t need it anymore, so in this case it’s better to delete it immediately after replacing it with None.

So we'll have the arg like "delete_on_replacing" on NestedField for enabling this behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant