mirror of
https://github.com/karma-riuk/crab.git
synced 2025-07-05 05:28:13 +02:00
the removal of the is_code_related in field in
selection broke backwards compatilibility. Fixed it
This commit is contained in:
@ -126,9 +126,7 @@ class Dataset:
|
|||||||
entries_to_dump = [
|
entries_to_dump = [
|
||||||
entry
|
entry
|
||||||
for entry in self.entries
|
for entry in self.entries
|
||||||
if entry.metadata.selection
|
if entry.metadata.selection and entry.metadata.selection.diff_after_address_change
|
||||||
and entry.metadata.selection.diff_after_address_change
|
|
||||||
and entry.metadata.selection.is_code_related
|
|
||||||
]
|
]
|
||||||
elif type_ in {OutputType.FULL, OutputType.WEBAPP} and remove_non_suggesting:
|
elif type_ in {OutputType.FULL, OutputType.WEBAPP} and remove_non_suggesting:
|
||||||
entries_to_dump = [
|
entries_to_dump = [
|
||||||
@ -180,6 +178,8 @@ class Dataset:
|
|||||||
for entry_data in data["entries"]:
|
for entry_data in data["entries"]:
|
||||||
metadata_data = entry_data["metadata"]
|
metadata_data = entry_data["metadata"]
|
||||||
selection_data = metadata_data["selection"] if "selection" in metadata_data else None
|
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
|
selection = Selection(**selection_data) if selection_data else None
|
||||||
metadata_data["selection"] = selection
|
metadata_data["selection"] = selection
|
||||||
if "id" not in metadata_data:
|
if "id" not in metadata_data:
|
||||||
|
Reference in New Issue
Block a user