mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
no need to return weight on suggestion apis
This commit is contained in:
parent
d9050aa5f8
commit
b7c0716e5c
@ -6,7 +6,7 @@ module Api
|
||||
entity_type: params.fetch(:entity_type, '').downcase
|
||||
).order('weight desc').limit(
|
||||
AttributeCategorySuggestion::SUGGESTIONS_RESULT_COUNT
|
||||
).pluck(:suggestion, :weight)
|
||||
).pluck(:suggestion)
|
||||
|
||||
if suggestions.empty?
|
||||
CacheMostUsedAttributeCategoriesJob.perform_later(
|
||||
|
||||
@ -7,7 +7,7 @@ module Api
|
||||
category_label: params.fetch(:category, '').downcase
|
||||
).order('weight desc').limit(
|
||||
AttributeFieldSuggestion::SUGGESTIONS_RESULT_COUNT
|
||||
).pluck(:suggestion, :weight)
|
||||
).pluck(:suggestion)
|
||||
|
||||
if suggestions.empty?
|
||||
CacheMostUsedAttributeFieldsJob.perform_later(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user