@@ -181,20 +181,6 @@ def write_image(zip_path: str, image_list: List[str]):
181181 os .makedirs (os .path .dirname (file_path ))
182182 with open (os .path .join (zip_path , file_path ), 'wb' ) as f :
183183 f .write (file .get_bytes ())
184- # else:
185- # r = text.replace('(/api/image/', '').replace(')', '')
186- # r = r.strip().split(" ")[0]
187- # if not is_valid_uuid(r):
188- # break
189- # image_model = QuerySet(Image).filter(id=r).first()
190- # if image_model is None:
191- # break
192- # zip_inner_path = os.path.join('api', 'image', r)
193- # file_path = os.path.join(zip_path, zip_inner_path)
194- # if not os.path.exists(os.path.dirname(file_path)):
195- # os.makedirs(os.path.dirname(file_path))
196- # with open(file_path, 'wb') as f:
197- # f.write(image_model.image)
198184
199185
200186def update_document_char_length (document_id : str ):
@@ -223,7 +209,6 @@ def or_get(exists_problem_list, content, knowledge_id, document_id, paragraph_id
223209 return problem , document_id , paragraph_id
224210
225211
226-
227212def get_knowledge_operation_object (knowledge_id : str ):
228213 knowledge_model = QuerySet (model = Knowledge ).filter (id = knowledge_id ).first ()
229214 if knowledge_model is not None :
0 commit comments