1
0
mirror of https://github.com/sismics/docs.git synced 2026-01-22 13:15:34 +00:00

Order of files attached to document

This commit is contained in:
jendib
2015-03-06 21:13:09 +01:00
parent 6c976087de
commit 2347483676
4 changed files with 19 additions and 25 deletions

View File

@@ -204,9 +204,9 @@ public class FileResource extends BaseResource {
}
// Update the file
// TODO Reorder files to put the new one at the end
file.setDocumentId(documentId);
fileDao.updateDocument(file);
file.setOrder(fileDao.getByDocumentId(documentId).size());
fileDao.update(file);
// Raise a new file created event (it wasn't sent during file creation)
try {