Skip to content

Commit c56bf0e

Browse files
authored
Merge pull request #17 from inceptphp/0.1
fix in history package logging on object create
2 parents 68f756e + bf36696 commit c56bf0e

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"squizlabs/php_codesniffer": "3.7.1"
1111
},
1212
"require": {
13-
"inceptphp/framework": "0.1.10",
14-
"phpugph/storm": "1.0.3",
13+
"inceptphp/framework": "0.1.11",
14+
"phpugph/storm": "1.0.4",
1515
"swiftmailer/swiftmailer": "6.2.7",
1616
"dejan7/httpquest": "0.3.0",
1717
"robthree/twofactorauth": "1.8.2",

history/events.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,13 @@
4545
//get the primary name
4646
$primary = $schema->getPrimaryName();
4747
//get the detail
48-
$detail = $this('event')->call('system-object-detail', [
49-
'schema' => $name,
50-
$primary => $response->getResults()
51-
]);
48+
$detail = $response->getResults();
5249

5350
//create the history
5451
$this('event')->call('system-object-history-create', [
5552
'history_action' => 'created',
5653
'history_object' => $name,
57-
'history_primary' => $response->getResults(),
54+
'history_primary' => $detail[$primary],
5855
'history_to' => $detail,
5956
'profile_id' => $profile
6057
]);

0 commit comments

Comments
 (0)