-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
Cleanup stale indexes and metadata columns #2335
base: 2.x
Are you sure you want to change the base?
Conversation
} | ||
|
||
portal = api.get_portal() | ||
for obj in portal.objectValues(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make it better explicit instead of iterating over all objects in the portal, e.g.:
base_catalog_idxs = ["CreationDate", ]
for cat_id, idxs in indexes_to_remove.items():
cat = api.get_tool(cat_id)
if isinstance(cat, BaseCatalog):
idxs.extend(base_catalog_idxs)
...
This PR is marked as |
Would you mind to resolve the conflicts of this PR and check if everything is still valid with the new catalogs? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind to remove only those indexes:
- CreationDate
- getProvince
- getDistrict
- getReceivedBy
- getSampler
Furthermore, the Upgrade step needs to be changed to 2519
.
@@ -143,22 +143,9 @@ def __init__(self, context, request): | |||
"toggle": True}), | |||
("ClientID", { | |||
"title": _("Client ID"), | |||
"index": "getClientID", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you remove this Index? Without this it is no longer possible to sort the columns by client ID.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the heads-up. Restored with 1b6e61d
Description of the issue/feature this PR addresses
Merge #2334 first
This Pull Request removes indexes and metadata columns that are no longer needed
--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.