-
Notifications
You must be signed in to change notification settings - Fork 0
Se mezclan los archivos generados #18
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR ensures that updating the iati_base_resource_id
extra preserves any other existing extras and refines how datasets are queried for that extra.
- Merge or replace the
iati_base_resource_id
extra without discarding other extras when patching a package. - Switch the dataset search to use CKAN’s
fq
filter and add debug logging for each found dataset.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
ckanext/iati_generator/blueprint/iati.py | Merge new iati_base_resource_id into existing extras instead of overwriting them. |
ckanext/iati_generator/actions/iati.py | Change package_search to use fq filter and log each dataset found. |
Comments suppressed due to low confidence (1)
ckanext/iati_generator/blueprint/iati.py:68
- [nitpick] This comment is in Spanish and includes an emoji; consider translating it to English and removing informal markers for consistency with the codebase’s style.
# 🛠 Reemplazar o agregar el extra sin perder los anteriores
search_result = toolkit.get_action("package_search")(context, { | ||
"q": "extras_iati_base_resource_id:[* TO *]", | ||
result = toolkit.get_action("package_search")(context, { | ||
"fq": "iati_base_resource_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.
CKAN indexes extras under extras_<key>
, so the filter should likely be extras_iati_base_resource_id:*
instead of iati_base_resource_id:*
to return the correct datasets.
"fq": "iati_base_resource_id:*", | |
"fq": "extras_iati_base_resource_id:*", |
Copilot uses AI. Check for mistakes.
Some notes:
|
fixes #17