Ignore:
Timestamp:
10/31/11 11:17:31 (8 years ago)
Author:
pcosquer
Message:

add tests for add_thumbnail
+ fix a bug: revising a document with a thumbnail raised an exception

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/openPLM/plmapp/controllers/document.py

    r400 r430  
    284284                ext = os.path.splitext(doc_file.thumbnail.path)[1] 
    285285                thumb = "%d%s" %(new_doc.id, ext) 
    286                 thumb_path = re.sub(r"/\d+_*%s$" % ext, "/" + thumb, 
     286                thumb_path = re.sub(r"/\d+_.*%s$" % ext, "/" + thumb, 
    287287                                    doc_file.thumbnail.path) 
    288288                shutil.copy(doc_file.thumbnail.path, thumb_path) 
Note: See TracChangeset for help on using the changeset viewer.