[hotfix] docstatus should be 0 if None
This commit is contained in:
parent
3e7e8cdd48
commit
7e1f08d64c
1 changed files with 3 additions and 1 deletions
|
|
@ -160,7 +160,9 @@ class BaseDocument(object):
|
|||
value.parent = self.name
|
||||
value.parenttype = self.doctype
|
||||
value.parentfield = key
|
||||
value.docstatus = 0
|
||||
|
||||
if value.docstatus is None:
|
||||
value.docstatus = 0
|
||||
|
||||
if not getattr(value, "idx", None):
|
||||
value.idx = len(self.get(key) or []) + 1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue