Skip to content

Commit 9c43538

Browse files
authored
Merge pull request #90 from intersystems-community/stage
update saving event
2 parents 0ce40d3 + 68a5a68 commit 9c43538

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<Name>zpm-registry</Name>
66
<ExternalName>ZPM Registry</ExternalName>
77
<Description>Registry server for ZPM</Description>
8-
<Version>1.1.16</Version>
8+
<Version>1.1.17</Version>
99
<Packaging>module</Packaging>
1010
<Dependencies>
1111
<ModuleReference>

src/cls/ZPM/Analytics/Event.cls

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,15 @@ ClassMethod SaveEvent(action As %String, ip As %String = "", json As %DynamicObj
4646
Set event = ..%New()
4747
Set event.Action = action
4848
Set event.IP = ip
49+
Do event.%JSONImport(json)
50+
$$$ThrowOnError(event.%Save())
4951
If ##class(%Dictionary.CompiledClass).%ExistsId("ZPM.Analytics.IP") {
5052
Do ##class(ZPM.Analytics.IP).SetGeo(event, ip)
5153
}
52-
DO event.%JSONImport(json)
5354
$$$ThrowOnError(event.%Save())
5455
Return $$$OK
5556
} Catch ex {
56-
do ex.Log()
57+
Do ex.Log()
5758
Return ex.AsStatus()
5859
}
5960
}

0 commit comments

Comments
 (0)