Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
GLPI
glpi
Commits
66655d81
Commit
66655d81
authored
Feb 03, 2021
by
Stanislas
Committed by
Johan Cwiklinski
Feb 11, 2021
Browse files
fix(api): manage mainitems_id foreignkey
parent
d35a351a
Changes
1
Hide whitespace changes
Inline
Side-by-side
inc/api/api.class.php
View file @
66655d81
...
...
@@ -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
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment