Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion cubedash/index/postgis/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -242,6 +241,7 @@ def put_summary(
TimeOverview.period_type == period,
),
)
.returning(TimeOverview.generation_time)
.values(
product_ref=product_id,
start_day=start_day,
Expand Down
2 changes: 1 addition & 1 deletion cubedash/index/postgres/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
5 changes: 4 additions & 1 deletion integration_tests/dumpdatasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import random
from datetime import datetime
from pathlib import Path
from typing import Any

import click
import yaml
Expand Down Expand Up @@ -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
Expand Down