Browse Source

Pass model id to exists method

This makes it compatible with Shim plugin
Val Bancer 7 years ago
parent
commit
31ff6bf1e6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Model/Behavior/WhoDidItBehavior.php

+ 1 - 1
Model/Behavior/WhoDidItBehavior.php

@@ -137,7 +137,7 @@ class WhoDidItBehavior extends ModelBehavior {
 			$data[$field] = false;
 		}
 
-		if (!$Model->exists()) {
+		if (!$Model->exists($Model->getID())) {
 			$data[$config['created_by_field']] = $userId;
 		}
 		if ($data) {