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

Updating or Deleting keys from MapAttributes #1215

Open
bjhowie opened this issue Jan 10, 2024 · 1 comment
Open

Updating or Deleting keys from MapAttributes #1215

bjhowie opened this issue Jan 10, 2024 · 1 comment

Comments

@bjhowie
Copy link

bjhowie commented Jan 10, 2024

This seems like it's probably a very simple question, so apologies in advance.

I just cannot figure out how to update or delete keys from a MapAttribute. The documention and examples dont seem to cover it and i've been struggling for hours trying to figure it out.

I can do it easily with update expression using boto3, but this functionaliy appears to have been removed from pynamodb (!?)

@ikonst
Copy link
Contributor

ikonst commented Jan 18, 2024

Do you mean when it's a raw MapAttribute? I think overriding with None should work, but please confirm:

my_model.my_map.key_i_dont_want_anymore = None

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

2 participants