Add resourcehandlerinfo creation management command#14118
Add resourcehandlerinfo creation management command#14118mattiagiupponi wants to merge 2 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new Django management command, fixup_resourcehandlerinfo.py, designed to generate missing ResourceHandlerInfo for Dataset objects based on their subtype. It also updates the 0046_dataset_migration.py to incorporate similar logic for datasets that lack associated files. The review identifies a critical issue in both the new command and the migration: the handler_module_path is incorrectly set using the string representation of a handler instance rather than its proper class module path, which could lead to incorrect behavior. Furthermore, the logging configuration in the new management command is noted as an area for improvement, as it directly modifies the root logger, potentially causing conflicts with Django's default logging setup.
Checklist
For all pull requests:
The following are required only for core and extension modules (they are welcomed, but not required, for contrib modules):
Submitting the PR does not require you to check all items, but by the time it gets merged, they should be either satisfied or inapplicable.