ish_manager 0.1.8.341 → 0.1.8.343

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 61c49a3cad8ca5b12bf89eb573cbca98aefc12c42d3e144ba3fc0d033cda4b23
4
- data.tar.gz: f282ccadc49c6a9d75f11446c81aa15dbc85af7bbf4cb11e9dbb8b0114e758a3
3
+ metadata.gz: 9204037598d38a1b9fcacec34082810e0ce113529353cd84fd3c5b3ee67f72f7
4
+ data.tar.gz: 78ea90c7560949402abda0a3b1a617c572c75912440276b633554a0b07e93333
5
5
  SHA512:
6
- metadata.gz: 0bed7e802a94b55d10992e3622e3a2083b30074ff8551b4fda9a68922277bef41a85faa155f5f12ce667119db73fafa52b0dd22503c9749ac64625b91cac8bbd
7
- data.tar.gz: d34937d2aac5a9922974963e49ca47a459c161891bb4044d96915497448ad50bf88defcfa88cfc5b12f228ef423f61aa7a51365c812ffe30275f210d5386c4a8
6
+ metadata.gz: d7227ca1e28a55fde3ad447a5e96bb1f63bd0fa52d0d15b790af1214e809f444b5855f1feabe863a0c955fac2a787923aaa69e645fb369e725fcd66bbc8cf1d0
7
+ data.tar.gz: 308ce581ae3ffccdf874a4c2f6c4e72c2eee61e7fc1cd1273b6bc342671c31f37e5fd21cb535d61a8e85acf8ebb91d9d9c0dfc752ed093f6c8a31dd20ca3ca7f
@@ -46,9 +46,9 @@ class ::IshManager::LeadsController < IshManager::ApplicationController
46
46
  flags = []
47
47
  errors = []
48
48
  CSV.read(file.path, headers: true).each do |row|
49
- puts! row, 'row'
50
- puts! row[3], 'email?'
51
- company = ::Leadset.find_or_create_by({ company_url: row[4] })
49
+ company_url = row[4].presence
50
+ company_url ||= "https://#{row[3].split('@')[1]}"
51
+ company = ::Leadset.find_or_create_by({ company_url: company_url })
52
52
  lead = ::Lead.new({
53
53
  name: row[2] || 'there',
54
54
  full_name: row[2] || 'there',