2021-03-11 19:13:27 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module BulkImports
|
|
|
|
module Groups
|
|
|
|
module Pipelines
|
|
|
|
class MembersPipeline
|
|
|
|
include Pipeline
|
|
|
|
|
|
|
|
extractor BulkImports::Common::Extractors::GraphqlExtractor,
|
|
|
|
query: BulkImports::Groups::Graphql::GetMembersQuery
|
|
|
|
|
|
|
|
transformer Common::Transformers::ProhibitedAttributesTransformer
|
|
|
|
transformer BulkImports::Groups::Transformers::MemberAttributesTransformer
|
|
|
|
|
2021-04-17 20:07:23 +05:30
|
|
|
def load(context, data)
|
|
|
|
return unless data
|
|
|
|
|
|
|
|
context.group.members.create!(data)
|
|
|
|
end
|
2021-03-11 19:13:27 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|