-
Notifications
You must be signed in to change notification settings - Fork 1
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
1155 add a column to track the reindexing curator #1180
base: dev
Are you sure you want to change the base?
1155 add a column to track the reindexing curator #1180
Conversation
for more information, see https://pre-commit.ci
DemoReindexing_Curator.mov |
# If reindexing_status is REINDEXING_NOT_NEEDED, set Reindexing Curator field to None (reset to default) | ||
if validated_data.get("reindexing_status") == 1: | ||
validated_data["reindexing_curated_by"] = None | ||
|
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.
Can we maintain the history of changes on this field?
Let's add a test file for the new features. Cover everything that makes sense, but also specifically I want to see that the ReindexingHistory logs are being maintained as we add additional reindexing curators. |
Can you also take a look at this part of the code:
|
@@ -426,6 +443,37 @@ function handleCuratorSelect() { | |||
}); | |||
} | |||
|
|||
function handleReindexingCuratorSelect() { |
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 this code dry and reuse code that we already have for CuratorSelect
Ok, slight design change. Lets only maintain one curator column, and populate the frontend based on the history. The original curator will be populated based on the first entry in the history table, and the reindexing curator will be populated based on the latest curator. |
The recurator doesn't get depopulated until curation in progress or recuration in progress. |
@@ -440,6 +488,16 @@ function postReindexingStatus(collection_id, reindexing_status) { | |||
}, | |||
success: function (data) { | |||
toastr.success("Reindexing Status Updated!"); | |||
|
|||
// If reindexing_status is REINDEXING_NOT_NEEDED, set Reindexing Curator field to None (reset to default) |
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.
Take a look at the post_save method in collection.py and refactor it based on standards.
Changes made: