Changeset 1668 in main for branches


Ignore:
Timestamp:
10/12/12 14:58:10 (7 years ago)
Author:
pcosquer
Message:

controllers:documents: fix encoding issue while revising a document

Location:
branches
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.0/openPLM/plmapp/controllers/document.py

    r1598 r1668  
    363363        for doc_file in self.object.files.all(): 
    364364            filename = doc_file.filename 
    365             path = models.docfs.get_available_name(filename) 
     365            path = models.docfs.get_available_name(filename.encode("utf-8")) 
    366366            shutil.copy(doc_file.file.path, models.docfs.path(path)) 
    367367            new_doc = models.DocumentFile.objects.create(file=path, 
  • branches/1.1/openPLM/plmapp/controllers/document.py

    r1598 r1668  
    377377        for doc_file in self.object.files.all(): 
    378378            filename = doc_file.filename 
    379             path = models.docfs.get_available_name(filename) 
     379            path = models.docfs.get_available_name(filename.encode("utf-8")) 
    380380            shutil.copy(doc_file.file.path, models.docfs.path(path)) 
    381381            new_doc = models.DocumentFile.objects.create(file=path, 
Note: See TracChangeset for help on using the changeset viewer.