diff --git a/canapEPFL/models/PersonnalData.php b/canapEPFL/models/PersonnalData.php
index 252fb129ef973e026f1d3278f9684488c98f6cd9..acb65b83e16660b215c497861309a6dbebaddb5e 100644
--- a/canapEPFL/models/PersonnalData.php
+++ b/canapEPFL/models/PersonnalData.php
@@ -66,7 +66,9 @@ class PersonnalData {
         $this->setStages();
         $this->setDejacand();
         $this->anneeFinScolarite = $postedData['anneeFin'];
-        $this->fichiers = $this->setFiles($postedFiles, $postedData['files']);
+
+        $this->fichiers = $this->setFiles($postedFiles, $postedData);
+
     }
     #endregion
 
@@ -131,7 +133,11 @@ class PersonnalData {
             if ($file['error'] != 0) {
                 unset($postedFiles[$key]);
             } else {
-                $postedFiles[$key]['id'] = $ids[$key];
+                // My guess is that code is only needed when editing a postulation,
+                // and run into warning when creating a new one. NBO 2021-01-11
+                if (isset($ids['files'][$key])) {
+                    $postedFiles[$key]['id'] = $ids['files'][$key];
+                }
             }
         }
         return $postedFiles;