Clean APIs

This commit is contained in:
Laurent Destailleur
2019-11-02 15:05:14 +01:00
parent b958997268
commit 93f3b1d2db
2 changed files with 14 additions and 0 deletions

View File

@@ -102,6 +102,7 @@ class DolibarrApi
unset($object->isextrafieldmanaged);
unset($object->ismultientitymanaged);
unset($object->restrictiononfksoc);
unset($object->table_rowid);
// Remove linkedObjects. We should already have linkedObjectIds that avoid huge responses
unset($object->linkedObjects);
@@ -149,6 +150,10 @@ class DolibarrApi
unset($object->context);
unset($object->next_prev_filter);
if ($object->table_element != 'ticket') {
unset($object->comments);
}
// Remove the $oldcopy property because it is not supported by the JSON
// encoder. The following error is generated when trying to serialize
// it: "Error encoding/decoding JSON: Type is not supported"