canvas_sync 0.27.7 → 0.27.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc79a9e2241e08965571784e4078895a0be737b2075d9dc7068cee78fee90a39
4
- data.tar.gz: 45a423897e00e97f90a785374ca10d967275874b61b1cb9a2afcfd69dccbb3bd
3
+ metadata.gz: 11f8cb2b6cbea897aacf6bd2a352fb5dd3a7d179281070bad4c6c10f90993b30
4
+ data.tar.gz: ea7421a010c1e3078a9b28e6d1503333c53214142c6111a7aa06ef23d13cdb82
5
5
  SHA512:
6
- metadata.gz: 7389e3c5fdc2dcb65b2330b19d5850298dddcc8fcc1ed57873f79594ad5bae59c2754ab6b1f1ef8350e9d2cbe8442e2631ca4dd7d90eb64ef4be1e6909245d7a
7
- data.tar.gz: 584dfdd57d8ff294560c62c584b46660f0177e3841a719bee167b13b879418c2553de007baad1b1866ad459234880219038d5037805da331b4a230ac5e2b3e07
6
+ metadata.gz: c569c7f78a291537c728a183d7598a594a9983a4be9febbde7b2c084d6207a65a8e4f640aa9f93cee36656bbaa3b156417783d405ce23626138fc77d5dfc83cc
7
+ data.tar.gz: 381f98ec9099bf3f845ed0e222587f69f868c30c1bb3966b85826d6c65405d51e98ddcf8487aacf19c07584dde3fc84e4df532938897d498e1f23a0c8724aaf6
@@ -35,6 +35,7 @@ module CanvasSync::Concerns
35
35
 
36
36
  def launch_context
37
37
  return nil unless panda_pal_session.present?
38
+ return @launch_context if defined?(@launch_context)
38
39
 
39
40
  @launch_context ||= begin
40
41
  if panda_pal_session.lti_launch_placement == "global_navigation"
@@ -57,6 +58,8 @@ module CanvasSync::Concerns
57
58
 
58
59
  @launch_account ||= load_canvas_model(::Account, panda_pal_session.get_lti_cust_param('custom_canvas_account_id'))
59
60
 
61
+ @launch_account ||= ::Account.find_by(canvas_parent_account_id: nil)
62
+
60
63
  @launch_account
61
64
  end
62
65
 
@@ -64,6 +67,8 @@ module CanvasSync::Concerns
64
67
 
65
68
  def load_canvas_model(model, canvas_id)
66
69
  return nil unless model < CanvasSync::Record
70
+ return nil unless canvas_id.present?
71
+ return nil if canvas_id.is_a?(String) && canvas_id.include?('$')
67
72
 
68
73
  if model.respond_to?(:find_or_jit_sync)
69
74
  model.find_or_jit_sync(canvas_id)
@@ -1,3 +1,3 @@
1
1
  module CanvasSync
2
- VERSION = "0.27.7".freeze
2
+ VERSION = "0.27.10".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canvas_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.7
4
+ version: 0.27.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Instructure CustomDev
@@ -413,14 +413,14 @@ dependencies:
413
413
  requirements:
414
414
  - - "~>"
415
415
  - !ruby/object:Gem::Version
416
- version: 0.1.0
416
+ version: 0.2.0
417
417
  type: :runtime
418
418
  prerelease: false
419
419
  version_requirements: !ruby/object:Gem::Requirement
420
420
  requirements:
421
421
  - - "~>"
422
422
  - !ruby/object:Gem::Version
423
- version: 0.1.0
423
+ version: 0.2.0
424
424
  email:
425
425
  - pseng@instructure.com
426
426
  executables: []