Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions datastore/services/write.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,13 @@ async def create_datastore(
# Tag the new resource as datastore-managed so CKAN (and our own
# read-only guard on subsequent writes) knows the datastore owns
# its data. Caller-supplied url_type is overridden on purpose.
# The schema goes in up front too: CKAN may validate it on create
# (e.g. an `upsert` resource must declare a primaryKey), so leaving
# it to the post-write sync would reject the resource.
resource = await context.ckan.resource_create(
resource={
**resource,
"schema": schema,
"url_type": "datastore",
"datastore_active": True,
}
Expand Down
Loading