From 30ac12127d7e401b65fd6acc123b81f89ab46071 Mon Sep 17 00:00:00 2001 From: venkataakhil Date: Wed, 12 Apr 2023 14:55:04 +0530 Subject: [PATCH] Change file path from assets to files path --- smart_service/apis/master_api.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/smart_service/apis/master_api.py b/smart_service/apis/master_api.py index 41efe5a..599cc10 100644 --- a/smart_service/apis/master_api.py +++ b/smart_service/apis/master_api.py @@ -369,6 +369,16 @@ def append_size_file(): frappe.db.commit() except: pass + return data except Exception as e: frappe.log_error("FIle size ", str(e)) return e + +def change_file_dir(): + pass + +def asset_to_files_path(): + frappe.db.sql(''' + update tabProcedure_Details set file =concat('/files/',SUBSTRING_INDEX(file,'/',-1)) where content_type = 'File' and file like '%Asset/%'; + ''') + frappe.db.commit() \ No newline at end of file