From 87b49b377d3f5fe39b1aebd574c0d1f94ff533f3 Mon Sep 17 00:00:00 2001 From: Karma Riuk Date: Mon, 2 Jun 2025 10:46:06 +0200 Subject: [PATCH] the removal of the is_code_related in field in selection broke backwards compatilibility. Fixed it --- dataset.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dataset.py b/dataset.py index 44a82d8..fe7ed8c 100644 --- a/dataset.py +++ b/dataset.py @@ -126,9 +126,7 @@ class Dataset: entries_to_dump = [ entry for entry in self.entries - if entry.metadata.selection - and entry.metadata.selection.diff_after_address_change - and entry.metadata.selection.is_code_related + if entry.metadata.selection and entry.metadata.selection.diff_after_address_change ] elif type_ in {OutputType.FULL, OutputType.WEBAPP} and remove_non_suggesting: entries_to_dump = [ @@ -180,6 +178,8 @@ class Dataset: for entry_data in data["entries"]: metadata_data = entry_data["metadata"] selection_data = metadata_data["selection"] if "selection" in metadata_data else None + if selection_data is not None and "is_code_related" in selection_data: + del selection_data['is_code_related'] selection = Selection(**selection_data) if selection_data else None metadata_data["selection"] = selection if "id" not in metadata_data: