Skip to content

Commit

Permalink
fix(meta): get_permitted_fields with no field-columns (backport #20401)…
Browse files Browse the repository at this point in the history
… (#20404)

Co-authored-by: gavin <gavin18d@gmail.com>
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
fix(meta): get_permitted_fields with no field-columns (#20401)
  • Loading branch information
3 people committed Mar 20, 2023
1 parent 2a84075 commit d2be9d7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions frappe/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@ def get_permitted_fields(

if doctype in core_doctypes_list:
return valid_columns

# DocType has only fields of type Table (Table, Table MultiSelect)
if set(valid_columns).issubset(default_fields):
return valid_columns

permitted_fields = meta.get_permitted_fieldnames(parenttype=parenttype, user=user)

Expand Down

0 comments on commit d2be9d7

Please sign in to comment.