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 d4583d93
authored
May 27, 2025
by
Taufikyu
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
bypass dulu
1 parent
75a77185
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
opensipkd/base/views/partner.py
opensipkd/base/views/partner.py
View file @
d4583d9
import
colander
import
traceback
from
deform
import
(
widget
,
Button
,
)
...
...
@@ -262,14 +263,19 @@ class ViewPartner(BaseView):
return
result
def
save_request
(
self
,
values
,
row
=
None
):
if
"idcard"
in
values
and
values
[
"idcard"
]:
if
str
(
self
.
req
.
POST
[
'upload'
])
!=
""
:
folder
=
self
.
get_params
(
"idcard_folder"
,
'/tmp/idcard'
)
upload
=
Upload
(
folder
)
file_name
=
upload
.
save
(
self
.
req
,
'upload'
,
img_exts
)
values
[
"idcard"
]
=
file_name
else
:
del
values
[
"idcard"
]
# bypass dulu
try
:
if
"idcard"
in
values
and
values
[
"idcard"
]:
if
str
(
self
.
req
.
POST
[
'upload'
])
!=
""
:
folder
=
self
.
get_params
(
"idcard_folder"
,
'/tmp/idcard'
)
upload
=
Upload
(
folder
)
file_name
=
upload
.
save
(
self
.
req
,
'upload'
,
img_exts
)
values
[
"idcard"
]
=
file_name
else
:
del
values
[
"idcard"
]
except
Exception
as
e
:
log
.
error
(
e
)
log
.
error
(
traceback
.
format_exc
())
row
=
super
()
.
save_request
(
values
,
row
)
return
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