1
0
Fork 0

Improve relationship import

This commit is contained in:
Alex Kotov 2019-09-01 16:46:38 +05:00
parent 126f70c511
commit 707c6c0cd3
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08

View file

@ -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