Changeset 1668 in main


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

controllers:documents: fix encoding issue while revising a document

Files:
3 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, 
  • trunk/openPLM/plmapp/controllers/document.py

    r1632 r1668  
    380380        for doc_file in self.object.files.all(): 
    381381            filename = doc_file.filename 
    382             path = models.docfs.get_available_name(filename) 
     382            path = models.docfs.get_available_name(filename.encode("utf-8")) 
    383383            shutil.copy(doc_file.file.path, models.docfs.path(path)) 
    384384            new_doc = models.DocumentFile.objects.create(file=path, 
     
    441441        doc_file.previous_revision = None 
    442442        doc_file.save() 
     443        new_file.name = new_file.name.encode("utf-8") 
    443444        deprecated_df = models.DocumentFile.objects.create( 
    444445                    document=self.object, 
Note: See TracChangeset for help on using the changeset viewer.