Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix(Injection): prevent Agent deletion on update dynamic object #418

Merged
merged 2 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Fix visibility of injection models
- Fix ```CommonDBRelation``` import
- Fix ```IPAddress``` import which adds a ```lock``` on ```last_update``` field

- Fix ```Agent``` lost when update dynamic asset

## [2.13.5] - 2024-02-22

Expand Down
2 changes: 1 addition & 1 deletion inc/commoninjectionlib.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1656,7 +1656,7 @@ private function effectiveAddOrUpdate($injectionClass, $item, $values, $add = tr
// allow to update locked fields from datainjection
// for dynamic item if needed
if ($item->maybeDynamic()) {
$toinject['is_dynamic'] = 0;
unset($toinject['is_dynamic']);
}
if ($item->update($toinject)) {
$newID = $toinject['id'];
Expand Down