Fix restore use of API get when ID = 0

This commit is contained in:
Laurent Destailleur
2022-08-27 19:02:05 +02:00
parent 72a2e67d7e
commit 96889609e8
3 changed files with 18 additions and 11 deletions

View File

@@ -115,6 +115,8 @@ class DolibarrApi
// Remove linkedObjects. We should already have linkedObjectsIds that avoid huge responses
unset($object->linkedObjects);
unset($object->linkedObjectsFullLoaded);
//unset($object->lines[$i]->linked_objects); // This is the array to create linked object during create
unset($object->fields);
unset($object->oldline);
@@ -139,6 +141,7 @@ class DolibarrApi
unset($object->projet); // Should be fk_project
unset($object->project); // Should be fk_project
unset($object->fk_projet); // Should be fk_project
unset($object->author); // Should be fk_user_author
unset($object->timespent_old_duration);
unset($object->timespent_id);