Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
aa.gusti
/
opensipkd-base
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 70edcc96
authored
Dec 28, 2025
by
aa.gustiana@gmail.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Fix error handling in validation and update default ordering in DataTables
1 parent
8711fc3f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
opensipkd/base/views/api_base.py
opensipkd/base/views/base_views.py
opensipkd/base/views/api_base.py
View file @
70edcc9
...
@@ -161,7 +161,7 @@ class ApiViews(APIView):
...
@@ -161,7 +161,7 @@ class ApiViews(APIView):
return
data
return
data
except
ValidationFailure
as
e
:
except
ValidationFailure
as
e
:
_log
.
error
(
"Error validasi
%
s"
,
str
(
e
.
error
.
asdict
()))
_log
.
error
(
"Error validasi
%
s"
,
str
(
e
.
error
.
asdict
()))
raise
HTTPBadRequest
(
explanation
=
str
(
e
.
error
.
asdict
()))
raise
HTTPBadRequest
(
explanation
=
str
(
e
.
error
.
asdict
()))
from
e
return
dict
(
data
)
return
dict
(
data
)
...
...
opensipkd/base/views/base_views.py
View file @
70edcc9
...
@@ -562,9 +562,9 @@ class BaseView(object):
...
@@ -562,9 +562,9 @@ class BaseView(object):
# log.debug(str(columns))
# log.debug(str(columns))
# qry = query.add_columns(*[c.sqla_expr for c in columns])
# qry = query.add_columns(*[c.sqla_expr for c in columns])
# log.debug(str(qry))
# log.debug(str(qry))
if
self
.
req
.
params
.
get
(
"order[0][column]"
,
None
)
:
if
self
.
req
.
params
.
get
(
"order[0][column]"
)
is
None
:
self
.
req
.
params
[
"order[0][column]"
]
=
'0'
self
.
req
.
GET
.
add
(
"order[0][column]"
,
'0'
)
self
.
req
.
params
[
"order[0][dir]"
]
=
'desc'
self
.
req
.
GET
.
add
(
"order[0][dir]"
,
'desc'
)
row_table
=
DataTables
(
self
.
req
.
GET
,
query
,
columns
)
row_table
=
DataTables
(
self
.
req
.
GET
,
query
,
columns
)
result
=
row_table
.
output_result
()
result
=
row_table
.
output_result
()
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment