Skip to content
Snippets Groups Projects
Unverified Commit 5a7b1b47 authored by vmaubert's avatar vmaubert Committed by GitHub
Browse files

fix(document): corrige l’ajout d’un document sans fichier (#122)

parent 3e31dc28
No related branches found
No related tags found
No related merge requests found
......@@ -152,7 +152,7 @@ const documentCreer = async (
if (document.fichierNouveau) {
document.fichier = true
await documentFileCreate(document, document.fichierNouveau.file)
} else {
} else if (document.nomTemporaire) {
// - arrivé via UI
const pathFrom = `/files/tmp/${document.nomTemporaire}`
const pathTo = await documentFilePathFind(document, true)
......
......@@ -267,6 +267,7 @@ export default {
if (file && validity.valid && file.type === 'application/pdf') {
this.warnings = []
this.document.fichierNouveau = file
this.document.fichier = true
this.document.fichierTypeId = 'pdf'
} else {
this.warnings = [
......
......@@ -38,8 +38,6 @@ const actions = {
delete document.id
}
document.fichier = true
// Il faut envoyer les données de "document" sans sa propriété "fichierNouveau"
// pour ne pas téléverser le fichier via GQL. Mais transformer "document" ici altère
// le rendu de la UI. Elle pointe vers la référence de "document.fichierNouveau"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment