Remove supplier_id from simple product serializer

This commit is contained in:
Gaetan Craig-Riou
2024-05-22 20:31:54 +10:00
parent b5cf47d306
commit 1c6d10d4e7

View File

@@ -3,13 +3,9 @@
module Api
module Admin
class ProductSimpleSerializer < ActiveModel::Serializer
attributes :id, :name, :producer_id
attributes :id, :name
has_many :variants, key: :variants, serializer: Api::Admin::VariantSimpleSerializer
def producer_id
object.supplier_id
end
end
end
end