Skip to content

Commit 8e367c6

Browse files
committed
Drop (now) obsolete code paths
Since the data key is used per default now, these code paths (which also (indirectly) implemented a check against the data key) became obsolete now. Signed-off-by: Jonas Brand (8R0WNI3) <[email protected]>
1 parent a07f768 commit 8e367c6

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

metadata.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -531,16 +531,6 @@ def reuse_discovery_date_if_possible(
531531
# resource-/package-version, so we must re-use its discovery date
532532
return old_metadata.discovery_date
533533

534-
elif new_metadata.type == odg.model.Datatype.DIKI_FINDING:
535-
if (
536-
new_metadata.data.get('provider_id') == old_metadata.data.get('provider_id')
537-
and new_metadata.data.get('ruleset_id') == old_metadata.data.get('ruleset_id')
538-
and new_metadata.data.get('rule_id') == old_metadata.data.get('rule_id')
539-
):
540-
# found the same finding in existing entry, independent of the component-/
541-
# resource-/ruleset-version, so we must re-use its discovery date
542-
return old_metadata.discovery_date
543-
544534
elif new_metadata.type == odg.model.Datatype.OSID_FINDING:
545535
if (
546536
new_metadata.data.get('osid').get('VERSION_ID')
@@ -551,11 +541,6 @@ def reuse_discovery_date_if_possible(
551541
# found the same version and name in existing entry, so we must re-use its discovery date
552542
return old_metadata.discovery_date
553543

554-
elif new_metadata.type == odg.model.Datatype.CRYPTO_FINDING:
555-
if new_metadata.data_key == old_metadata.data_key:
556-
# found the same finding in existing entry, so we must re-use its discovery date
557-
return old_metadata.discovery_date
558-
559544
if new_metadata.data_key == old_metadata.data_key:
560545
# found the same finding in existing entry, so we must re-use its discovery date
561546
return old_metadata.discovery_date

0 commit comments

Comments
 (0)