canvas_sync 0.18.1 → 0.18.3

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: 98a15ade4fa059c8a6641a20f560c32a81ff3ef066a46c7e79bd2182e25bed18
4
- data.tar.gz: 9d08800f6bdc163b40e727ae97ebb7baf82abe47d585e252860c6e31cf812144
3
+ metadata.gz: 13177d09ca23d9bd29f83117cb1321cfbd21f36c690212647177657d95f23c23
4
+ data.tar.gz: b0e2816208c92844c8f63e0209365bffecb98c6091512ad881164fa604b40011
5
5
  SHA512:
6
- metadata.gz: d603c64d9ca24d974913f6c422c9a0f3f6a9eecb6486a0d6f8fc26a57bffaa1c40971ec56bd54adb1a187896307accc2e7910947db90bd79d3737d6d7d773c76
7
- data.tar.gz: 5a8d948e840c39e1e47647d0f8c4dcd46057349abf9818ce9acb04879408c3ee37961fab8fa1391832f7f35d1e099eba1c627c211370316eda564fd65e1f5430
6
+ metadata.gz: 9a196e827d48234c0da749c4cbe672e8f0e6583de5258fa7b2d20099706687089b7d01c771aa00f7dfab0513ab54e67a04ee0b170ac05c1dee6c7d5794458101
7
+ data.tar.gz: cbe1be336eda39a93939a3f2bf12454ff74ac77569b83ab2e4aed71aaba0670cf9764ecffede496f02e46dee4f752e479b5ab4d2645b2ad20cd42f95103817da
@@ -43,9 +43,11 @@ module CanvasSync
43
43
 
44
44
  class ::Object
45
45
  def canvas_sync_client(account_id = nil)
46
+ org = PandaPal::Organization.current
47
+ org = org.platform_api(PandaPal::Platform::Canvas) if (PandaPal::Organization.instance_method(:platform_api) rescue nil)
46
48
  Bearcat::Client.new(
47
- prefix: current_organization.canvas_url,
48
- token: current_organization.canvas_api_token,
49
+ prefix: org.canvas_url,
50
+ token: org.canvas_api_token,
49
51
  master_rate_limit: (Rails.env.production? && !!defined?(Redis) && ENV['REDIS_URL'].present?),
50
52
  )
51
53
  end
@@ -27,7 +27,7 @@ module CanvasSync
27
27
  CanvasSync::Jobs::ReportChecker.set(wait: report_checker_wait_time).perform_later(
28
28
  report_name,
29
29
  report_id,
30
- processor,
30
+ processor.to_s,
31
31
  options
32
32
  )
33
33
  end
@@ -101,7 +101,9 @@ module CanvasSync
101
101
  included do
102
102
  define_model_callbacks :sync_import
103
103
 
104
- if column_names.include?("canvas_sync_batch_id")
104
+ col_names = column_names rescue []
105
+
106
+ if col_names.include?("canvas_sync_batch_id")
105
107
  belongs_to :canvas_sync_batch, foreign_key: :canvas_sync_batch_id, class_name: "CanvasSync::SyncBatch", optional: true
106
108
  end
107
109
  end
@@ -1,3 +1,3 @@
1
1
  module CanvasSync
2
- VERSION = "0.18.1".freeze
2
+ VERSION = "0.18.3".freeze
3
3
  end