@@ -94,11 +94,11 @@ def process_calevent(calevent)
9494 event_to_add = OpenStruct . new . tap do |event |
9595 assign_basic_info ( event , calevent )
9696 assign_time_info ( event , calevent )
97- assign_location_info ( event , calevent . location )
97+ assign_location_info ( event , calevent )
9898 end
9999 add_event ( event_to_add )
100100 rescue StandardError => e
101- @messages << "process_calevent failed with : #{ e . message } "
101+ Rails . logger . error ( " #{ e . class } : #{ e . message } ")
102102 end
103103
104104 # Assigns to event: url, title, description, keywords.
@@ -118,11 +118,13 @@ def assign_time_info(event, calevent)
118118 end
119119
120120 # Assigns to event: venue, online, city.
121- def assign_location_info ( event , location )
121+ def assign_location_info ( event , calevent )
122+ location = calevent . location
122123 return if location . blank?
123124
124125 event . venue = location . to_s
125- event . online = location . downcase . include? ( 'online' )
126+ event . online = calevent . description . include? ( 'zoom' )
127+ event . presence = calevent . description . include? ( 'zoom' ) ? :hybrid : :onsite # can do best, but sufficient for now
126128 event . city , event . postcode , event . country = process_location ( location )
127129 end
128130
0 commit comments