Skip to content

fix: detect existing AgriSoilExtended by id, not by type query - #17

Merged
k8-benetis merged 3 commits into
masterfrom
fix/ingest-existence-by-id
Aug 6, 2026
Merged

fix: detect existing AgriSoilExtended by id, not by type query#17
k8-benetis merged 3 commits into
masterfrom
fix/ingest-existence-by-id

Conversation

@basabot

@basabot basabot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

The ingest worker detected an existing AgriSoilExtended entity via queryEntities(type=AgriSoilExtended) filtered by id. But the reader uses the platform @context Link, which expands the type to the canonical URI (nkz-os/sdm-proposals) — while the stored entity may be under the default-context URI. This false-zero makes the existence check fail, falling through to create_entity which 409s (id already exists).

Fix: replace the type-query existence check with a type-agnostic get_entity(id) call. The wrapper already exposes get_entity (returns None on 404). This is robust regardless of stored type URI.

@k8-benetis
k8-benetis merged commit 0bd57ac into master Aug 6, 2026
7 checks passed
@k8-benetis
k8-benetis deleted the fix/ingest-existence-by-id branch August 6, 2026 20:16
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.

2 participants