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

Unable to create a dataset without resources #377

Open
madelinekosse opened this issue Jun 28, 2023 · 2 comments
Open

Unable to create a dataset without resources #377

madelinekosse opened this issue Jun 28, 2023 · 2 comments

Comments

@madelinekosse
Copy link

I have set CKAN__DATASET__CREATE_ON_UI_REQUIRES_RESOURCES=False in my ckan configuration, as I wish to create datasets without any resources. However, the addition of the scheming plugin has removed that functionality. In the scheming "add dataset" page, a draft dataset is created at the end of each step and it is only converted to an active state when a resource is added. My understanding is that the post to the create dataset endpoint is intercepted to add the draft state, and then the active state is set in the plugin's new resource handler. The result is that if I click through the new dataset page and click "finish" without adding a resource to the resource page, nothing happens. I believe this is a bug, as we should be able to finish creating the dataset without adding a new resource.

@wardi
Copy link
Contributor

wardi commented Jun 28, 2023

yes, sounds like a bug. ckanext-scheming only overrides the templates but not the views so there's probably a difference in the core templates that needs to be copied into ckanext-scheming.

@madelinekosse
Copy link
Author

I believe it is this line that needs to be included in this function

madelinekosse added a commit to madelinekosse/ckanext-scheming that referenced this issue Jul 5, 2023
Temporary fix for ckan#377:

When ckan is configured with
`CKAN__DATASET__CREATE_ON_UI_REQUIRES_RESOURCES=False`, you should be
able to create a dataset without any resources but the scheming plugin
overrides this as it sets the state to draft until any resources are
added. This temporary fix means that the resources step is omitted from
the add dataset form and a catalog entry is created with no resources.

Not a solution worth actually using - the correct fix would allow the
option for something like "save without adding resources" on the
resource page instead of skipping over the resources. I haven't done
that since I don't need it for what I'm doing right now and it sounds
like the maintainers are on fixing the issue.
madelinekosse added a commit to madelinekosse/ckanext-scheming that referenced this issue Jul 10, 2023
Temporary fix for ckan#377:

When ckan is configured with
`CKAN__DATASET__CREATE_ON_UI_REQUIRES_RESOURCES=False`, you should be
able to create a dataset without any resources but the scheming plugin
overrides this as it sets the state to draft until any resources are
added. This temporary fix means that the resources step is omitted from
the add dataset form and a catalog entry is created with no resources.

Not a solution worth actually using - the correct fix would allow the
option for something like "save without adding resources" on the
resource page instead of skipping over the resources. I haven't done
that since I don't need it for what I'm doing right now and it sounds
like the maintainers are on fixing the issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants