Skip to content

Commit

Permalink
Merge pull request #374 from CybercentreCanada/hotfix/discover
Browse files Browse the repository at this point in the history
Allow use of REL only classification groups
  • Loading branch information
cccs-sgaron authored Sep 24, 2021
2 parents 996ce6e + 08d5ac3 commit 7a2e543
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 7a2e543

Please sign in to comment.