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

Fix worksheets are not uncatalogued when deleted #2453

Merged
merged 7 commits into from
Dec 20, 2023
Merged

Fix worksheets are not uncatalogued when deleted #2453

merged 7 commits into from
Dec 20, 2023

Conversation

xispa
Copy link
Member

@xispa xispa commented Dec 20, 2023

Description of the issue/feature this PR addresses

This Pull Requests ensures that when removing a Worksheet, the object is uncatalogued as well. Besides, this PR adds some functions in the API and an upgrade step to purge stale worksheets

Current behavior before PR

When deleting a Worksheet (w/o analyses), the system does not uncatalog the worksheet

Desired behavior after PR is merged

When deleting a Worksheet (w/o analyses), the system does uncatalog the worksheet

--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.

if obj is None:
# object is missing, remove
logger.info("Removing stale record: {}".format(path))
cat.uncatalog_object(path)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be api.uncatalog_object instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, because we don't have an object here, but a path. api.uncatalog_object expects an object

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, you are right, thanks!

@ramonski ramonski merged commit f8d2add into 2.x Dec 20, 2023
2 checks passed
@ramonski ramonski deleted the delete_ws branch December 20, 2023 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants