Skip to content

Commit

Permalink
Using id instead of instance_id.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysrevans3 committed Jan 15, 2025
1 parent 2bd6fd9 commit a49b835
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions esgf-consumer/esgf_consumer/items.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ async def create_item(
path = f"collections/{collection_id}/items"
url = urljoin(str(settings.stac_server), path)

logger.critical("Posting %s to %s", getattr(item.properties, "instance_id"), url)
logger.critical("Posting %s to %s", getattr(item, "id"), url)
result = await client.post(url, content=(item.model_dump_json()), timeout=5)
if result.status_code < 300:
logger.critical("Item posted")
Expand All @@ -36,7 +36,7 @@ async def update_item(
path = f"collections/{collection_id}/items/{item_id}"
url = urljoin(str(settings.stac_server), path)

logger.critical("Updating %s to %s", getattr(item.properties, "instance_id"), url)
logger.critical("Updating %s to %s", getattr(item, "id"), url)
result = await client.put(url, content=(item.model_dump_json()), timeout=5)
if result.status_code < 300:
logger.critical("Item updated")
Expand Down

0 comments on commit a49b835

Please sign in to comment.