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 cd4dba1a
authored
Jul 06, 2026
by
aa.gustiana@gmail.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: enhance logging for query execution and error handling in BaseView
1 parent
f3ebf8df
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
opensipkd/base/views/base_views.py
opensipkd/base/views/base_views.py
View file @
cd4dba1
...
...
@@ -825,8 +825,10 @@ class BaseView(object):
def
view_view
(
self
,
**
kwargs
):
request
=
self
.
req
row
=
self
.
query_id
()
.
first
()
qry
=
self
.
query_id
()
row
=
qry
.
first
()
if
not
row
:
log
.
debug
(
str
(
qry
.
statement
.
compile
(
compile_kwargs
=
{
'literal_binds'
:
True
})))
return
self
.
id_not_found
()
self
.
ses
[
"readonly"
]
=
True
...
...
@@ -1196,6 +1198,7 @@ class BaseView(object):
msg
=
f
"Data yang dicari Tidak Ditemukan ID:"
\
f
" {self.req.matchdict['id']}."
self
.
req
.
session
.
flash
(
msg
,
'error'
)
log
.
error
(
msg
)
return
self
.
route_list
(
**
kwargs
)
def
get_values
(
self
,
row
,
istime
=
False
,
null
=
False
):
...
...
@@ -1250,6 +1253,8 @@ class BaseView(object):
is_object
=
kwargs
.
get
(
"is_object"
,
self
.
is_object
)
kwargs
[
"is_object"
]
=
is_object
if
not
row
:
log
.
debug
(
self
.
query_id
()
.
statement
.
compile
(
compile_kwargs
=
{
'literal_binds'
:
True
}))
return
self
.
id_not_found
(
**
kwargs
)
if
self
.
edit_restrict
(
row
):
...
...
@@ -1350,6 +1355,9 @@ class BaseView(object):
is_object
=
kwargs
.
get
(
"is_object"
,
self
.
is_object
)
kwargs
[
"is_object"
]
=
is_object
if
not
row
:
log
.
debug
(
str
(
q
.
statement
.
compile
(
compile_kwargs
=
{
'literal_binds'
:
True
})))
return
self
.
id_not_found
()
if
not
self
.
bindings
:
self
.
bindings
=
self
.
get_bindings
(
row
)
...
...
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