Skip to content

Commit

Permalink
Fix(Injection): prevent Agent deletion on update dynamic object (#418)
Browse files Browse the repository at this point in the history
* Fix(Injection): prevent Agent deletion on update dynamic object

* adapt CHANGELOG
  • Loading branch information
stonebuzz authored Oct 10, 2024
1 parent 195a8dd commit 2a8ac46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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

0 comments on commit 2a8ac46

Please sign in to comment.