@@ -262,7 +262,9 @@ def create_singleton_methods_and_instance_variables(row, row_data)
262
262
parsed_method = __method__ . to_s [ 0 ...-1 ] . split ( "_" ) . join ( " " )
263
263
cookies = Core . options [ "cookies" ]
264
264
headers = Core . options [ "headers" ]
265
-
265
+
266
+ p new_value , column_hash . key ( parsed_method ) , column_names , schema
267
+
266
268
request_id = extract_id ( SecureRandom . hex ( 16 ) )
267
269
transaction_id = extract_id ( SecureRandom . hex ( 16 ) )
268
270
space_id = extract_id ( SecureRandom . hex ( 16 ) )
@@ -273,12 +275,24 @@ def create_singleton_methods_and_instance_variables(row, row_data)
273
275
space_id : space_id ,
274
276
}
275
277
276
- update_property_value = Utils ::CollectionViewComponents . update_property_value ( @id , column_hash . key ( parsed_method ) , new_value )
278
+ update_property_value_hash = Utils ::CollectionViewComponents . update_property_value ( @id , column_hash . key ( parsed_method ) , new_value )
277
279
278
280
operations = [
279
- update_property_value ,
281
+ update_property_value_hash ,
280
282
]
281
283
284
+ if %q[select multi_select] . include? ( schema [ column_hash . key ( parsed_method ) ] [ "type" ] )
285
+ p "ENTERED THE ABYSS"
286
+ options = schema [ column_hash . key ( parsed_method ) ] [ "options" ] . nil? ? [ ] : schema [ column_hash . key ( parsed_method ) ] [ "options" ] . map { |option | option [ "value" ] }
287
+ multi_select_multi_options = new_value . split ( "," )
288
+ multi_select_multi_options . each do |option |
289
+ if !options . include? ( option . strip )
290
+ create_new_option = Utils ::CollectionViewComponents . add_new_option ( column_hash . key ( parsed_method ) , option . strip , @collection_id )
291
+ operations . push ( create_new_option )
292
+ end
293
+ end
294
+ end
295
+
282
296
request_url = URLS [ :UPDATE_BLOCK ]
283
297
request_body = build_payload ( operations , request_ids )
284
298
response = HTTParty . post (
0 commit comments