فهرست منبع

corretto un errore nell'eliminazine del file in managefile

mauro 1 سال پیش
والد
کامیت
1500364426
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      documento/managefile.py

+ 2 - 2
documento/managefile.py

@@ -32,9 +32,9 @@ def delete_file(documento):
   file_path = os.path.join(settings.BASE_DIR,getConfig('DocPath'),documento.utente.azienda.partitaiva,documento.utente.codicefiscale,documento.storage)
   file_path = os.path.join(settings.BASE_DIR,getConfig('DocPath'),documento.utente.azienda.partitaiva,documento.utente.codicefiscale,documento.storage)
   print('Path completa:',file_path)
   print('Path completa:',file_path)
   if os.path.isfile(file_path):
   if os.path.isfile(file_path):
-    print('rimozione fisica file:',posizione)  
+    print('rimozione fisica file:',file_path)  
     try:
     try:
-      os.remove(posizione)
+      os.remove(file_path)
     except OSError as ose:
     except OSError as ose:
       print('errore nella rimozione del file:',ose)
       print('errore nella rimozione del file:',ose)