Skip to content

Commit 3242824

Browse files
committed
ensure consistent indexing upon appending by additional normalization
1 parent d17430d commit 3242824

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

openeo/extra/job_management/stac_job_db.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ def initialize_from_df(self, df: pd.DataFrame, *, on_exists: str = "error"):
105105
elif on_exists == "append":
106106
existing_df = self.get_by_status([])
107107
df = self._normalize_df(df)
108-
df = pd.concat([existing_df, df], ignore_index=True).replace({np.nan: None})
108+
df = pd.concat([existing_df, df])
109+
df = self._normalize_df(df) # normalize again after concat to fix index
110+
df = df.replace({np.nan: None})
109111
self.persist(df)
110112
return self
111113

0 commit comments

Comments
 (0)