Commit 66655d81 authored by Stanislas's avatar Stanislas Committed by Johan Cwiklinski
Browse files

fix(api): manage mainitems_id foreignkey

parent d35a351a
......@@ -2475,6 +2475,10 @@ abstract class API extends CommonGLPI {
if ($key == "default_requesttypes_id") {
$key = "requesttypes_id";
}
// mainitems_id mainitemtype
if ($key == "mainitems_id" && isset($fields['mainitemtype'])) {
$key = getForeignKeyFieldForItemType($fields['mainitemtype']);
}
if (!empty($value)
|| $key == 'entities_id' && $value >= 0) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment