fix: Add default score of 1 to Item Group Autocompleter

- If score 0 is inserted into suggestions, RS does not consider that suggestion
This commit is contained in:
marination 2022-04-04 12:04:35 +05:30
parent 97e3a855f7
commit 7ef1ccbe84

View File

@ -209,7 +209,7 @@ def create_item_groups_autocomplete_dict(autocompleter):
autocompleter.add_suggestions(
Suggestion(
string=item_group.name,
score=item_group.weightage,
score=frappe.utils.flt(item_group.weightage) or 1.0,
payload=payload, # additional info that can be retrieved later
)
)