rails 6: plugin fixes
Change-Id: I564efaf24386ca690b48fb1231df1960dadf5850 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250618 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Simon Williams <simon@instructure.com> QA-Review: Simon Williams <simon@instructure.com> Product-Review: Simon Williams <simon@instructure.com>
This commit is contained in:
parent
d52d6968c2
commit
2a614036ca
|
@ -283,7 +283,7 @@ module AccountReports::ReportHelper
|
|||
if enable_i18n_features
|
||||
options = CsvWithI18n.csv_i18n_settings(@account_report.user)
|
||||
end
|
||||
ExtendedCSV.open(file, "w", options) do |csv|
|
||||
ExtendedCSV.open(file, "w", **options) do |csv|
|
||||
csv.instance_variable_set(:@account_report, @account_report)
|
||||
csv << headers unless headers.nil?
|
||||
activate_report_db(use_primary: compile) { yield csv } if block_given?
|
||||
|
|
|
@ -840,7 +840,7 @@ module AccountReports
|
|||
|
||||
def xlist_query_options(xl)
|
||||
xl = xl.where.not(course_sections: {sis_batch_id: nil}) if @created_by_sis
|
||||
xl = xl.where.not(courses: {sis_source_id: nil}, course_sections: {sis_source_id: nil}) if @sis_format
|
||||
xl = xl.where.not(courses: {sis_source_id: nil}).where.not(course_sections: {sis_source_id: nil}) if @sis_format
|
||||
|
||||
if @include_deleted
|
||||
xl.where!("(courses.workflow_state<>'deleted'
|
||||
|
|
|
@ -75,7 +75,7 @@ module ReportSpecHelper
|
|||
}
|
||||
skip_order = true if options[:order] == 'skip'
|
||||
order = Array(options[:order]).presence || [0, 1]
|
||||
all_parsed = CSV.parse(csv, csv_parse_opts).map.to_a
|
||||
all_parsed = CSV.parse(csv, **csv_parse_opts).map.to_a
|
||||
raise 'Must order report results to avoid brittle specs' unless options[:order].present? || all_parsed.count < 3
|
||||
header = all_parsed.shift
|
||||
if all_parsed.present? && !skip_order
|
||||
|
|
|
@ -102,7 +102,7 @@ module TestDatabaseUtils
|
|||
connection.execute("TRUNCATE TABLE #{table_names.map { |t| connection.quote_table_name(t) }.join(',')}")
|
||||
end
|
||||
Account.find_or_create_by!(id: 0).
|
||||
update_attributes(name: 'Dummy Root Account', workflow_state: 'deleted', root_account_id: nil)
|
||||
update(name: 'Dummy Root Account', workflow_state: 'deleted', root_account_id: nil)
|
||||
end
|
||||
|
||||
def get_sequences(connection)
|
||||
|
|
Loading…
Reference in New Issue