Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
scc-net
netvs
netvs-core
Commits
2c3e7ee6
Commit
2c3e7ee6
authored
Jun 17, 2020
by
janis.streib
🦉
Browse files
FIX: correct index parsing for ta-errors
parent
0da95ae3
Pipeline
#92689
passed with stages
in 7 minutes and 36 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
frontend/src/main.js
View file @
2c3e7ee6
...
...
@@ -186,7 +186,7 @@ const store = new Vuex.Store({
state
.
transaction_result
=
{
'
type
'
:
'
error
'
,
'
error
'
:
e
.
response
.
data
.
exception
,
'
uuid
'
:
state
.
ta_list
[
e
.
response
.
data
.
exception
.
traceback
[
0
].
param
[
'
wapi.transaction_stmt.index
'
]
].
uuid
'
uuid
'
:
state
.
ta_list
[
APIUtil
.
getAPIErrorIndexFromDBException
(
e
.
response
.
data
.
exception
)
].
uuid
}
window
.
localStorage
.
setItem
(
'
transaction_result
'
,
JSON
.
stringify
(
state
.
transaction_result
))
}
...
...
@@ -216,7 +216,7 @@ const store = new Vuex.Store({
state
.
transaction_result
=
{
'
type
'
:
'
error
'
,
'
error
'
:
e
.
response
.
data
.
exception
,
'
uuid
'
:
state
.
ta_list
[
e
.
response
.
data
.
exception
.
traceback
[
0
].
param
[
'
wapi.transaction_stmt.index
'
]
].
uuid
'
uuid
'
:
state
.
ta_list
[
APIUtil
.
getAPIErrorIndexFromDBException
(
e
.
response
.
data
.
exception
)
].
uuid
}
window
.
localStorage
.
setItem
(
'
transaction_result
'
,
JSON
.
stringify
(
state
.
transaction_result
))
}
...
...
frontend/src/util/apiutil.js
View file @
2c3e7ee6
...
...
@@ -38,5 +38,13 @@ export default {
res
.
push
(
app
)
}
return
res
},
getAPIErrorIndexFromDBException
(
e
)
{
for
(
let
t
of
e
.
traceback
)
{
if
(
'
param
'
in
t
&&
'
wapi.transaction_stmt.index
'
in
t
.
param
)
{
return
t
.
param
[
'
wapi.transaction_stmt.index
'
]
}
}
return
-
1
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment