Merge pull request #10274 from prssanna/links-fix
fix(Document Link): Error when group is set in link
This commit is contained in:
commit
f5f3ed4488
1 changed files with 2 additions and 1 deletions
|
|
@ -452,6 +452,7 @@ class Meta(Document):
|
|||
for link in self.links:
|
||||
link.added = False
|
||||
for group in data.transactions:
|
||||
group = frappe._dict(group)
|
||||
# group found
|
||||
if link.group and group.label == link.group:
|
||||
if link.link_doctype not in group.get('items'):
|
||||
|
|
@ -460,7 +461,7 @@ class Meta(Document):
|
|||
|
||||
if not link.added:
|
||||
# group not found, make a new group
|
||||
data.transactions.append(frappe._dict(
|
||||
data.transactions.append(dict(
|
||||
label = link.group,
|
||||
items = [link.link_doctype]
|
||||
))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue