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 8464476b
authored
Sep 12, 2022
by
aagusti
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
perbaikan partner master slave wilayah saat get raw jika character is None
1 parent
2d71d682
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
opensipkd/base/views/partner.py
opensipkd/base/views/partner_base.py
opensipkd/base/views/partner.py
View file @
8464476
...
...
@@ -43,6 +43,7 @@ class AddSchema(PartnerSchema):
title
=
"Company"
)
def
after_bind
(
self
,
schema
,
kwargs
):
super
()
.
after_bind
(
schema
,
kwargs
)
request
=
kwargs
[
"request"
]
if
request
.
user
.
company_id
:
self
[
"company_id"
]
.
widget
=
widget
.
HiddenWidget
()
...
...
@@ -54,6 +55,8 @@ class EditSchema(AddSchema):
missing
=
colander
.
drop
,
widget
=
widget
.
HiddenWidget
(),
)
def
after_bind
(
self
,
schema
,
kwargs
):
super
()
.
after_bind
(
schema
,
kwargs
)
class
ListSchema
(
colander
.
Schema
):
...
...
opensipkd/base/views/partner_base.py
View file @
8464476
...
...
@@ -129,3 +129,11 @@ class PartnerSchema(NamaSchema):
status
=
colander
.
SchemaNode
(
colander
.
Boolean
(),
oid
=
"status"
)
def
after_bind
(
self
,
schema
,
kwargs
):
request
=
kwargs
[
"request"
]
prefix
=
request
.
route_url
(
"home"
)
self
[
"provinsi_id"
]
.
slave_url
=
f
"{prefix}/dati2/select/act?provinsi_id="
self
[
"dati2_id"
]
.
slave_url
=
f
"{prefix}/kecamatan/select/act?dati2_id="
self
[
"kecamatan_id"
]
.
slave_url
=
f
"{prefix}/desa/select/act?kecamatan_id="
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