caboose-rets 0.1.201 → 0.1.203

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: f1b4b6ff0c775671f9a244f839c13cef1434ff88aec91e6350986e90576dbd33
4
- data.tar.gz: 4a73e4b7cfa26103d560b26a8186154dd178cecfe3997892cc41fc206dc21f07
3
+ metadata.gz: 7fe6d89952e28e5be39405b4dee01efc08435ee2e203b997dad845c3cba31c51
4
+ data.tar.gz: df50f3d5f141acf640bc57bc325543290cc47c89fc0e7fd70ea1848e7876545d
5
5
  SHA512:
6
- metadata.gz: e6ad2462c021a949d8ddfa45ebabd09d9a6b5b503364008863f41bc8b296c1d83f385917abea7ea7e33c369e78c0e577882c518b34ea56986d3f8be4ecd4c521
7
- data.tar.gz: 85a52e88f700a5a84e06a65d4c0767c8059901d9fa65288dd4674e6ff849b0677a2e7a4e1172408e6ac9f0068a65f74139ed3e14ec26f2277226f7903a426b9a
6
+ metadata.gz: 207f3d0f78f6760248f98e1c922092ad2d2489dc181024198c4274225df4bdea6c3212d40e1c8cc2c6d4c4f378daa90c1353b3a57fe2d388d3d57b83879bd9cd
7
+ data.tar.gz: 9ceaddafa9088596fcdf43846a7be84212e672a30b5133cb1f8ac44a5bf1c1b2d512fd54b7959977c1490408e20e841dbc45a537d267b731123ca9c8835c8ceb
@@ -315,14 +315,14 @@ class CabooseRets::RetsImporter # < ActiveRecord::Base
315
315
  old_cm_id = is_new ? nil : m.media_id
316
316
 
317
317
  cm = Caboose::Media.where(:id => old_cm_id).first
318
- cm = Caboose::Media.new if cm.nil?
318
+ cm = Caboose::Media.create(:name => "rets_media_#{photo['ResourceRecordKey']}_#{ind}") if cm.nil?
319
319
 
320
- cm.name = "rets_media_#{photo['ResourceRecordKey']}_#{ind}"
321
- cm.save
320
+ #cm.name = "rets_media_#{photo['ResourceRecordKey']}_#{ind}"
321
+ #cm.save
322
322
 
323
- m.media_id = cm.id
323
+ m.media_id = cm ? cm.id : nil
324
324
  m.save
325
- ids_to_keep << m.id
325
+ ids_to_keep << m.id if m
326
326
 
327
327
  if !is_new
328
328
  old_media = Caboose::Media.where(:id => old_cm_id).first
@@ -72,7 +72,7 @@ class CabooseRets::RetsImporter # < ActiveRecord::Base
72
72
  :query => query,
73
73
  :timeout => -1
74
74
  }
75
- obj = nil
75
+ obj = nil
76
76
 
77
77
  begin
78
78
  self.client.search(params) do |data|
@@ -1,3 +1,3 @@
1
1
  module CabooseRets
2
- VERSION = '0.1.201'
2
+ VERSION = '0.1.203'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-rets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.201
4
+ version: 0.1.203
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry