File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -29,15 +29,15 @@ def initialize(response, result_class)
29
29
if response . body . has_key? ( :record_list )
30
30
# basic search results
31
31
record_list = response . body [ :record_list ] [ :record ]
32
- record_list = [ record_list ] if @total_records == 1
32
+ record_list = [ record_list ] unless record_list . is_a? ( Array )
33
33
34
34
record_list . each do |record |
35
35
results << result_class . new ( record )
36
36
end
37
37
elsif response . body . has_key? :search_row_list
38
38
# advanced search results
39
39
record_list = response . body [ :search_row_list ] [ :search_row ]
40
- record_list = [ record_list ] if @total_records == 1
40
+ record_list = [ record_list ] unless record_list . is_a? ( Array )
41
41
42
42
record_list . each do |record |
43
43
# TODO because of customFieldList we need to either make this recursive
You can’t perform that action at this time.
0 commit comments