Skip to content

Commit

Permalink
Allow use of REL only classification groups
Browse files Browse the repository at this point in the history
  • Loading branch information
cccs-sgaron committed Sep 24, 2021
1 parent 1b1952b commit 08d5ac3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions assemblyline/common/classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ def _get_c12n_groups(self, c12n: str, long_format: bool = True) -> Tuple[List, L
groups = []
for gp in grp_part:
gp = gp.replace("REL TO ", "")
gp = gp.replace("REL ", "")
temp_group = set([x.strip() for x in gp.split(",")])
for t in temp_group:
groups.extend(t.split("/"))
Expand Down Expand Up @@ -709,6 +710,7 @@ def is_valid(self, c12n: str, skip_auto_select: bool = False) -> bool:
return False

c12n = c12n.replace("REL TO ", "")
c12n = c12n.replace("REL ", "")
parts = c12n.split("//")

# There is a maximum of 3 parts
Expand Down

0 comments on commit 08d5ac3

Please sign in to comment.