[ckan-dev] Harvester - Problem
Sean Hammond
sean.hammond at okfn.org
Mon Jan 14 10:33:25 UTC 2013
Hi Michael,
This can probably be fixed by changing your custom schema.
This sounds like it's a custom schema problem and probably has nothing
to do with the harvesters. If you create a dataset belonging to a group
using the package_create APIv3 call, does it get added to the group?
What if you update a dataset using package_update? I suspect you might
be able to reproduce your problem just by calling the API with your
custom schema active, without using harvester at all. That would confirm
it's a schema problem.
You're using quite an old version of CKAN, I know there were some bugs
in IDatasetForm's default schemas in older versions of CKAN and I think
the fixes may have gone into CKAN 1.8, so you may still have the bugs.
The bugs can be worked around by adding stuff to your custom schema. For
example, look at ckanext-ecportal:
https://github.com/okfn/ckanext-ecportal/blob/master/ckanext/ecportal/forms.py#L181
Finally, can you post your custom schema, or rather, your
form_to_db_schema, db_to_form_schema, etc. code? That might give us some
clues.
On Mon, Jan 14, 2013 at 09:25:30AM +0100, Michael Reichart wrote:
> Hi,
>
> I've got a problem with our harvester-extensions.
>
> We are harvesting CKAN-Instances which worked actually really good, until
> we changed our CKAN - inputform to insert our extra fields into CKAN. For
> this we have also changed our schema, which now seems to be the problem.
> The objects from the harvesters are already in the right form to put into
> CKAN, but in the harvesting process, they are also sent through our
> "form_to_db_schema" methods.
> The problem is, that this results in not being able to correctly add
> datasets to groups. Even existing datasets in correct groups, that are
> being updated loose their relation to the group.
>
> I've tried to hardcode the groups or set them in the
> "default_groups"-setting of the harvester, or put them in the same way as
> the input-form does, but nothing worked.
> Any ideas?? Can I bypass the "form_to_db_schema"?? Or change the schema?
>
> We are currently using CKAN 1.7.1
>
> Thanks for help
> michi
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
More information about the ckan-dev
mailing list