diff --git a/cubedash/index/postgis/_api.py b/cubedash/index/postgis/_api.py index 50e0fb14a..75ee71c52 100644 --- a/cubedash/index/postgis/_api.py +++ b/cubedash/index/postgis/_api.py @@ -232,7 +232,6 @@ def put_summary( with self.index._active_connection() as conn: return conn.execute( insert(TimeOverview) - .returning(TimeOverview.generation_time) .on_conflict_do_update( index_elements=["product_ref", "start_day", "period_type"], set_=summary_row, @@ -242,6 +241,7 @@ def put_summary( TimeOverview.period_type == period, ), ) + .returning(TimeOverview.generation_time) .values( product_ref=product_id, start_day=start_day, diff --git a/cubedash/index/postgres/_api.py b/cubedash/index/postgres/_api.py index 718e8dfd7..58fd9b191 100644 --- a/cubedash/index/postgres/_api.py +++ b/cubedash/index/postgres/_api.py @@ -278,7 +278,6 @@ def put_summary( with self.index._active_connection() as conn: return conn.execute( insert(TIME_OVERVIEW) - .returning(TIME_OVERVIEW.c.generation_time) .on_conflict_do_update( index_elements=["product_ref", "start_day", "period_type"], set_=summary_row, @@ -288,6 +287,7 @@ def put_summary( TIME_OVERVIEW.c.period_type == period, ), ) + .returning(TIME_OVERVIEW.c.generation_time) .values( product_ref=product_id, start_day=start_day, diff --git a/integration_tests/dumpdatasets.py b/integration_tests/dumpdatasets.py index 7988b84c5..f2be87cc3 100644 --- a/integration_tests/dumpdatasets.py +++ b/integration_tests/dumpdatasets.py @@ -6,6 +6,7 @@ import random from datetime import datetime from pathlib import Path +from typing import Any import click import yaml @@ -65,7 +66,9 @@ def dump_datasets( ) -def _get_dumpable_doc(dc: Datacube, d: Dataset, include_sources=True): +def _get_dumpable_doc( + dc: Datacube, d: Dataset, include_sources: bool = True +) -> dict[str, Any]: if include_sources: dataset = dc.index.datasets.get(d.id, include_sources=include_sources) assert dataset is not None