Improve relationship import
This commit is contained in:
parent
126f70c511
commit
707c6c0cd3
1 changed files with 5 additions and 5 deletions
|
@ -6,13 +6,13 @@ class ImportRelationship
|
|||
def call
|
||||
return if status.nil? || regional_office_id.nil?
|
||||
|
||||
if status == :supporter || status == :excluded
|
||||
create_supporter_relationship
|
||||
case status
|
||||
when :supporter then create_supporter_relationship
|
||||
when :member then create_member_relationship
|
||||
when :excluded then create_excluded_relationship
|
||||
else
|
||||
create_member_relationship
|
||||
raise "Invalid status: #{status.inspect}"
|
||||
end
|
||||
|
||||
create_excluded_relationship if status == :excluded
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Reference in a new issue