cioos-siooc / ckan

CKAN is an open-source DMS (data management system) for powering data hubs and data portals. CKAN makes it easy to publish, share and use data. It powers datahub.io, catalog.data.gov and europeandataportal.eu/data/en/dataset among many other sites.
http://ckan.org/
Other
2 stars 4 forks source link

Error while deleting resources #189

Closed stephane-lapointe closed 10 months ago

stephane-lapointe commented 1 year ago

CKAN version

2.9.7/1.3.1

Describe the bug Trying to delete a resources (manualy or with the API), there is an validation error message related tu datacenter producing an internal server error.

Steps to reproduce

Delete a resource manualy in the catalogue

Expected behavior

Resource should be deleted normally without errors.

Additional details

stephane-lapointe commented 1 year ago

I don't know if it's related, but I cannot delete an organization too. Could it be related to a CIOOS specific schema? (I'm thinking about extra data)

If it worth something, here is the message related to organization:

sqlalchemy.exc.IntegrityError: (psycopg2.errors.ForeignKeyViolation) update or delete on table "group" violates foreign key constraint "group_extra_revision_group_id_fkey" on table "group_extra_revision"

stephane-lapointe commented 1 year ago

Would you prefer a distinct issue?

fostermh commented 1 year ago

same issue is fine. likely the same problem. thanks for the extra info.

fostermh commented 10 months ago

this appears to be fixed. datacenter is now defaults to an empty list during harvest. If reharvesting existing datasets is not an option then a bulk update to set datacentre = [] may be required. This can be done via the api and repeated calls to the package_update, or better the package_revise, endpoint