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 659c6d4a
authored
Sep 26, 2024
by
aa.gusti
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
perbaikan row.keys() menjadi row._mappping.keys()
1 parent
4c50bb42
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
opensipkd/base/views/base_views.py
opensipkd/base/views/user_area.py
opensipkd/base/views/base_views.py
View file @
659c6d4
...
...
@@ -417,7 +417,7 @@ class BaseView(object):
def
csv_response
(
self
,
**
kwargs
):
query
=
self
.
table
.
query_register
()
row
=
query
.
first
()
header
=
row
.
keys
()
header
=
row
.
_mapping
.
keys
()
rows
=
[
list
(
item
)
for
item
in
query
.
all
()]
filename
=
f
"{get_random_string(16)}.csv"
value
=
{
...
...
@@ -471,8 +471,7 @@ class BaseView(object):
query
=
self
.
db_session
.
query
()
.
select_from
(
self
.
table
)
query
=
self
.
list_join
(
query
,
**
kwargs
)
if
self
.
req
.
user
and
self
.
req
.
user
.
company_id
and
hasattr
(
self
.
table
,
"company_id"
):
if
self
.
req
.
user
and
self
.
req
.
user
.
company_id
and
hasattr
(
self
.
table
,
"company_id"
):
query
=
query
.
filter
(
self
.
table
.
company_id
==
self
.
req
.
user
.
company_id
)
query
=
self
.
list_filter
(
query
,
**
kwargs
)
...
...
opensipkd/base/views/user_area.py
View file @
659c6d4
...
...
@@ -59,8 +59,8 @@ class Views(BaseView):
@view_config
(
route_name
=
'user-area'
,
renderer
=
'templates/form.pt'
,
permission
=
'user-view'
)
def
view_list
(
self
):
return
super
()
.
view_list
()
def
view_list
(
self
,
**
kwargs
):
return
super
()
.
view_list
(
**
kwargs
)
@view_config
(
route_name
=
'user-area-act'
,
renderer
=
'json'
,
permission
=
'user-view'
)
...
...
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