@@ -150,7 +150,6 @@ def new(self,
150
150
review_by_human_freqeuncy = None ,
151
151
label_mode = None ,
152
152
passes_per_file = None ,
153
- file_list = None ,
154
153
guide = None ,
155
154
launch_datetime = None ,
156
155
label_file_list = None ,
@@ -221,12 +220,6 @@ def new(self,
221
220
# TODO review better way to update fields
222
221
job .id = data ["job" ]["id" ]
223
222
224
- if file_list :
225
- # Careful we want to call job here not self
226
- # Since job will have a different id
227
- # self is constructor
228
- job .file_update (file_list = file_list )
229
-
230
223
if guide :
231
224
job .guide_update (guide = guide )
232
225
@@ -243,53 +236,7 @@ def new(self,
243
236
244
237
return job
245
238
246
- def file_update (
247
- self ,
248
- file_list ,
249
- add_or_remove = "add"
250
- ):
251
- """
252
-
253
- Arguments
254
- self,
255
- file_list, list of files,
256
- add_or_remove, either "add" or "remove"
257
-
258
- Expects
259
-
260
- Returns
261
-
262
- Assumptions
263
-
264
- The API will use the project default if None is supplied
265
- but if we are not in the default we must supply valid
266
- directory_id
267
-
268
- Otherwise when it checks permissions it will error
269
- ie {"file_link":"File link not in incoming directory"}
270
239
271
- """
272
-
273
- endpoint = "/api/v1/project/" + self .client .project_string_id + \
274
- "/job/file/attach"
275
-
276
- file_list = [file .serialize () for file in file_list ]
277
-
278
- update_dict = {
279
- 'directory_id' : self .client .directory_id ,
280
- 'file_list_selected' : file_list ,
281
- 'job_id' : self .id ,
282
- 'add_or_remove' : add_or_remove }
283
-
284
- response = self .client .session .post (self .client .host + endpoint ,
285
- json = update_dict )
286
-
287
- self .client .handle_errors (response )
288
-
289
- data = response .json ()
290
-
291
- if data ["log" ]["success" ] == True :
292
- print ("File update success" )
293
240
294
241
def launch (
295
242
self
0 commit comments