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

Bug When Counting Objects Undeleted by the Admin #170

Open
ShmuelTreiger opened this issue Oct 8, 2021 · 3 comments
Open

Bug When Counting Objects Undeleted by the Admin #170

ShmuelTreiger opened this issue Oct 8, 2021 · 3 comments

Comments

@ShmuelTreiger
Copy link
Contributor

ShmuelTreiger commented Oct 8, 2021

New to the project, this seems like a bug to me, but perhaps I'm wrong:

Screen Shot 2021-10-08 at 12 56 48 AM

The first 4 messages were all when I successfully undeleted all the objects I selected (i.e. I selected 2 objects and successfully undeleted both), whereas the last message was when I undeleted 8 out of 100 objects (i.e. I selected 100 objects and 8 were undeleted). I'm thinking that perhaps the two messages are mixed up?

Doesn't really matter to me, overall the project works great, just thought I'd raise the issue.

Thanks

@Gagaro
Copy link
Member

Gagaro commented Oct 11, 2021

Hi, thanks for the report.
I'm not sure what's up here, I'm not even sure we are counting the changed objects from the right queryset from looking at the code.

Feel free to do a PR if you have a fix.

@ShmuelTreiger
Copy link
Contributor Author

Spent some time looking at the code, but I don't think I have enough experience with Django to diagnose the problem and I don't have the time ATM to actually debug it. I guess we can leave this open and perhaps you or I (or someone else) will get around to it one day 🤷‍♂️

@jerivas
Copy link

jerivas commented Jan 26, 2022

The wrong admin messages happen when the action you just took removes the elements from the current view. For example when you are filtering by "Only deleted" and undelete an element you are taken back to "Only deleted" and the recently undeleted element is not there anymore, which somehow trips up the message logic.

A workaround might be to always return the user to a view where all items (deleted or not) are visible, instead of preserving their previous filters.

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

3 participants