File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
contentctl/actions/detection_testing Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -111,11 +111,19 @@ def getChanges(self, target_branch:str)->List[Detection]:
111
111
raise Exception (f"More than 1 Lookup reference the modified CSV file '{ decoded_path } ': { [l .file_path for l in matched ]} " )
112
112
else :
113
113
updatedLookup = matched [0 ]
114
+ elif decoded_path .suffix == ".mlmodel" :
115
+ # Detected a changed .mlmodel file. However, since we do not have testing for these detections at
116
+ # this time, we will ignore this change.
117
+ updatedLookup = None
118
+
119
+
114
120
else :
115
- raise Exception (f"Error getting lookup object for file { str (decoded_path )} " )
121
+ raise Exception (f"Detected a changed file in the lookups/ directory '{ str (decoded_path )} '.\n "
122
+ "Only files ending in .csv, .yml, or .mlmodel are supported in this "
123
+ "directory. This file must be removed from the lookups/ directory." )
116
124
117
- if updatedLookup not in updated_lookups :
118
- # It is possible that both th CSV and YML have been modified for the same lookup,
125
+ if updatedLookup is not None and updatedLookup not in updated_lookups :
126
+ # It is possible that both the CSV and YML have been modified for the same lookup,
119
127
# and we do not want to add it twice.
120
128
updated_lookups .append (updatedLookup )
121
129
You can’t perform that action at this time.
0 commit comments