diff --git a/quotaclimat/data_processing/mediatree/detect_keywords.py b/quotaclimat/data_processing/mediatree/detect_keywords.py index a5baa28c..55c5a9fd 100644 --- a/quotaclimat/data_processing/mediatree/detect_keywords.py +++ b/quotaclimat/data_processing/mediatree/detect_keywords.py @@ -265,7 +265,9 @@ def filter_and_tag_by_theme(df: pd.DataFrame) -> pd.DataFrame : def add_primary_key(row): logging.info(f"Adding primary key to save to PG and have idempotent results") try: - return get_consistent_hash(str(row["start"].timestamp()) + row["channel_name"]) + hash_id = get_consistent_hash(str(row["start"]) + row["channel_name"]) + logging.debug(f"hash_id {hash_id}") + return hash_id except (Exception) as error: logging.error(f"{error} with df {row}")