Skip to content

Commit

Permalink
fix: return df label only when not none
Browse files Browse the repository at this point in the history
(cherry picked from commit 0d80ffc)
  • Loading branch information
GursheenK authored and mergify[bot] committed Oct 17, 2023
1 parent 9c7fa7c commit 3d692d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frappe/model/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ def get_label(self, fieldname):
"""Get label of the given fieldname"""

if df := self.get_field(fieldname):
return df.label
if df.label:
return df.label

if fieldname in DEFAULT_FIELD_LABELS:
return DEFAULT_FIELD_LABELS[fieldname]()
Expand Down

0 comments on commit 3d692d5

Please sign in to comment.