commit c4cea620faa03f3437e28cbe2c31319c8ec287f8
parent 6ddaa993b2056ad4cb4c88e795026f4504714e93
Author: srfsh <dev@srf.sh>
Date: Thu, 17 Nov 2022 13:49:45 +0300
Zenflows.VF.EconomicResource,{Query,Type}: fix name queries
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/zenflows/vf/economic_resource/query.ex b/src/zenflows/vf/economic_resource/query.ex
@@ -55,7 +55,7 @@ defp all_f(q, {:or_gt_onhand_quantity_has_numerical_value, v}),
do: or_where(q, [x], x.onhand_quantity_has_numerical_value > ^v)
defp all_f(q, {:name, v}),
do: where(q, [x], ilike(x.name, ^"%#{v}%"))
-defp all_f(q, {:namen, v}),
+defp all_f(q, {:or_name, v}),
do: or_where(q, [x], ilike(x.name, ^"%#{v}%"))
@spec all_validate(Schema.params()) ::
diff --git a/src/zenflows/vf/economic_resource/type.ex b/src/zenflows/vf/economic_resource/type.ex
@@ -252,8 +252,8 @@ input_object :economic_resource_filter_params do
field :or_custodian, list_of(non_null(:id))
field :gt_onhand_quantity_has_numerical_value, :float
field :or_gt_onhand_quantity_has_numerical_value, :float
- field :name, list_of(non_null(:string))
- field :or_name, list_of(non_null(:string))
+ field :name, :string
+ field :or_name, :string
end
object :query_economic_resource do