|
|
@ -378,7 +378,13 @@ 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() |
|
|
|
try: |
|
|
|
count = frappe.db.sql(''' |
|
|
|
select count(*) from tabProcedure_Details where content_type = 'File' and file like '%Asset/%';''') |
|
|
|
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() |
|
|
|
return count |
|
|
|
except: |
|
|
|
return False |