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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fe6d89952e28e5be39405b4dee01efc08435ee2e203b997dad845c3cba31c51
|
4
|
+
data.tar.gz: df50f3d5f141acf640bc57bc325543290cc47c89fc0e7fd70ea1848e7876545d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
data/lib/caboose_rets/version.rb
CHANGED