Conversation
…tions Control Panel
Co-authored-by: Steve Piercy <web@stevepiercy.com>
…n RecycleBin class
…ng exceptions to propagate
…e for improved performance
Co-authored-by: David Glick <david@glicksoftware.com>
… option from registry
…rovide meaningful error messages
…rage and remove unneccesary checks
…age by removing unnecessary checks
…undant checks for collections
…y for better localization support and optimize addition of workflow entries
…y raising KeyError for missing items
…isting_object method by removing _v_restoring_from_recyclebin check
… storage and recycle bin
|
@davisagli, I have made the next set of changes with some clarifications reqd from u... check #4223 (comment) |
| child_path = child_data.get("path") | ||
| child_orig_id = child_data.get("id") | ||
|
|
||
| for storage_id, storage_data in list(self.storage.get_items()): |
There was a problem hiding this comment.
@rohnsha0 Okay, I took another look. Actually I misunderstood. The children are only stored under their parent in ["children"], and not separately stored at the top level of the recycle bin. I think that is good.
I also think it means we don't need to do this process to clean up items with the same path as a child. If I delete an item /a that has a child /a/b, and then I create a new item /a/b and delete it, it should exist as a separate entry in the recycle bin. Restoring or purging the first item that was deleted should not affect the second one. It should remain in the recycle bin, and could be restored to a different path.
| return False | ||
|
|
||
| try: | ||
| # Purge any nested children first if this is a folder |
There was a problem hiding this comment.
And similarly, I don't think we need or want to do this.
| # Get items sorted by date (oldest first) and calculate total size | ||
| for item_id, data in self.storage.get_items_sorted_by_date(reverse=False): | ||
| size = data.get("size", 0) | ||
| total_size += size |
There was a problem hiding this comment.
We should also include the size of any children, right?
|
@davisagli @rohnsha0 Is there any chance this will be ready for Plone 6.2? |
|
@wesleybl No, we decided not to push it for 6.2. We'd like to deliver it with support in both Classic UI and Volto. I will try to work on it at the Beethoven Sprint. |
…s of standalone child entries Co-authored-by: Copilot <copilot@github.com>
…ldren Co-authored-by: Copilot <copilot@github.com>
ref #2966
to be merged together:-
replaces #4168