Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
仰若水
frappe
Commits
61866f6a
Commit
61866f6a
authored
9 years ago
by
Nabin Hait
Browse files
Options
Download
Email Patches
Plain Diff
[fix] Set _idx based on Custom Field
parent
aaa57659
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frappe/custom/doctype/custom_field/custom_field.py
+3
-5
frappe/custom/doctype/custom_field/custom_field.py
with
3 additions
and
5 deletions
+3
-5
frappe/custom/doctype/custom_field/custom_field.py
View file @
61866f6a
...
...
@@ -92,11 +92,9 @@ class CustomField(Document):
# Create new peroperty setter if order changed
if
_idx
and
not
existing_property_setter
:
field_idx
=
(
_idx
.
index
(
self
.
insert_after
)
+
1
)
if
(
self
.
insert_after
in
_idx
)
else
len
(
_idx
)
if
field_idx
<
len
(
_idx
):
_idx
[
field_idx
]
=
self
.
fieldname
else
:
_idx
.
append
(
self
.
fieldname
)
_idx
.
insert
(
field_idx
,
self
.
fieldname
)
frappe
.
make_property_setter
({
"doctype"
:
self
.
dt
,
"doctype_or_field"
:
"DocType"
,
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help