Skip to content
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

Use dkan_allowed_extensions() during harvest #2781

Merged

Conversation

rhabbachi
Copy link
Contributor

@rhabbachi rhabbachi commented Dec 26, 2018

connects #2577

Description.

The dkan_allowed_extensions() function (added in #2664 is the way to go when overriding resources allowed extensions. During a harvest a check on the allowed extensions is done to honor the user setting. This PR will update this check (done in HarvestMigration::prepareResourceHelper) to use dkan_allowed_extensions() instead of querying the field settings.

How to reproduce

Step-by-step instructions for reproducing the bug:

  1. Add harvest source that have resources with extensions that are not part of the default field setting but allowed via the dkan_allowed_extensions().
  2. Run Harvest on the source.

Expected:
All the resources are harvested and imported correctly.

Currently:
Resources with non default extensions introduced via dkan_allowed_extensions() fail to be harvested.

QA Steps

  1. Add harvest source that have resources with extensions that are not part of the default field setting.
  2. Make sure to allowed the non default extension via the dkan_allowed_extensions() mechanism.
  3. Run Harvest on the source.

The Harvest should proceed without issues.

Merge process

  • N/A

Reminders

  • There is test for the issue.
  • Coding standards checked.
  • Review docs.getdkan.com (or in /docs) to see if it still covers the scope of the PR and update if needed.

@rhabbachi rhabbachi changed the title Description. Please write any background information about this PR you think is useful for the product team. Use any of the items below that are relevant to this pull request, and delete any that are not. Use dkan_allowed_extensions() during harvest Dec 26, 2018
@rhabbachi
Copy link
Contributor Author

I suspect that this PR can be connected to #2577

@dafeder dafeder self-assigned this Dec 26, 2018
@dafeder dafeder assigned janette and unassigned dafeder Dec 28, 2018
@dafeder dafeder added this to the DKAN Sprint 11 milestone Dec 28, 2018
@janette
Copy link
Member

janette commented Dec 28, 2018

Thank you @rhabbachi it works!

@janette janette merged commit ad48a83 into GetDKAN:7.x-1.x Dec 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants