-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Deleting an element from middle of ListField results in an incorrect list. #1318
Comments
This bug appears to also effecting the subclass EmbeddedDocumentList. I'm doing work-arounds at the moment, but I'd like to get this fixed at some point. The bug is still in 10.0.6. So, I'm considering tracing down the source of the error and correcting. But before I get started: Is anyone else working on this? Any conflicts? (BTW, the actual list item does get deleted in memory. The error appears to be in actually saving the document with the deletion. Just guessing, it is doing an update rather than a deletion on the list item.) |
This is definitely a bug, good catch! FYI, I noticed that using |
@JohnAD AFAIK nobody else is working on it. I'd love to see a PR if you can find and fix the issue! |
Starting to work on this. But in the meantime, there appears to be an easy workaround; at least for my combination of versions: use the So, given the example above, replace:
with:
|
Running this gives the following result:
I would expect the modified list to be [1, 3, 4]. If I completely replace the list (test_list.test_list = [1, 3, 4]) instead of deleting an element it works fine.
The text was updated successfully, but these errors were encountered: