Add resourcehandlerinfo creation management command#14118
Add resourcehandlerinfo creation management command#14118mattiagiupponi merged 5 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.
giohappy
left a comment
There was a problem hiding this comment.
@mattiagiupponi I wouldn't add a dedicated management command to the core, since this isn't a functionality we need outside the one-shot usage of fixing the broken migration.
I would have it as a GIST maybe, or documented inside the wiki.
|
@giohappy PR updated |
* Add resourcehandlerinfo creation management command (cherry picked from commit 2deaccd)
* Add resourcehandlerinfo creation management command (cherry picked from commit 2deaccd) Co-authored-by: mattiagiupponi <[email protected]>
…format * commit 'f8e9fb4585129ad4e028ede61e55e468575207c2': (34 commits) Fix formatting Merge commit from fork [Fixes GeoNode#13939] Add support for non-spatial datasets in CSV format in GeoNode (GeoNode#13900) build(deps): bump cryptography from 46.0.5 to 46.0.7 (GeoNode#14116) Add resourcehandlerinfo creation management command (GeoNode#14118) build(deps): update jwcrypto requirement from >=1.5.6 to >=1.5.7 (GeoNode#14127) build(deps-dev): update pip requirement from >=19.1 to >=26.0.1 (GeoNode#14125) [Fixes GeoNode#14095] Upload thumbnails through the UI for the remote spatial datasets (GeoNode#14096) build(deps): bump python-calamine from 0.6.1 to 0.6.2 (GeoNode#14102) build(deps): bump django from 5.2.12 to 5.2.13 (GeoNode#14115) [Fixes GeoNode#14111] Fix Harvester lookup failure caused by trailing ? during the remote resource upload through the API (GeoNode#14112) updated folder for RTD [Fixes GeoNode#14097] Label thesaurus is not reloaded on thesaurus changes (GeoNode#14098) [Fixes GeoNode#14109] Fixes Dataset creation from JSON Schema fails for LineString (GeoNode#14110) Renamed docs folder [Fixes GeoNode#14035] Implementation of a common ResourceManager base class for all resource types (GeoNode#14053) moving the example in the end of this section adding docs for the social account group sync [Fixes GeoNode#14042] deprecate overwrite_existing_layers in favor of action… (GeoNode#14043) [Fixes GeoNode#13936] Support for XLSX File Uploads in GeoNode (GeoNode#13937) ...
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.