Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
w2pext
plugin_dbui
Commits
4cb3d7ce
Commit
4cb3d7ce
authored
Oct 19, 2016
by
LE GAC Renaud
Browse files
Update converter._to_field and to_model to fix a bug.
parent
6f78d8ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
modules/plugin_dbui/converter.py
modules/plugin_dbui/converter.py
+2
-2
No files found.
modules/plugin_dbui/converter.py
View file @
4cb3d7ce
...
...
@@ -144,7 +144,7 @@ def _to_field(field, linkedcombo=True, **kwargs):
# in addition the JSON dumps will failed
# therefore the default value are limited to types which can be JSONify.
default
=
field
.
default
if
default
and
isinstance
(
default
,
JSON_TYPES
):
if
default
is
not
None
and
isinstance
(
default
,
JSON_TYPES
):
cfg
[
"value"
]
=
default
# the checkBox is rendered initially checked
...
...
@@ -806,7 +806,7 @@ def to_model(table):
# therefore the default value are limited to types which
# can be JSONifyied.
default
=
field
.
default
if
default
and
isinstance
(
default
,
JSON_TYPES
):
if
default
is
not
None
and
isinstance
(
default
,
JSON_TYPES
):
field_cfg
[
'defaultValue'
]
=
default
cfg
[
'fields'
].
append
(
field_cfg
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment