canvas_sync 0.21.0 → 0.21.1

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: aecd0f3989ecb1b42c9f8c1c83274333eabe316bf05407cc2de7113e14590cb6
4
- data.tar.gz: 104cbae017ac24e83b5ad357ed381c6af24577917ec1a494ef9456478874eea0
3
+ metadata.gz: 91cef213b20532ac2e59ddc623501a788ecf1a19766e3d8ac9ebd1b4f3775e26
4
+ data.tar.gz: 2e8f03c8d079bcfeb31b4ea14c1cf52e82126fa2cb03d94e2a3b1c7b89fd5190
5
5
  SHA512:
6
- metadata.gz: 8059b7b6fcadd5c0b8750b705881496dc63bb90a232e9d950618dff0682f5410ea9cc18a84b9a8a22ea4a051262fb2946c0c6c05a39e3a86871a6ee460f75f08
7
- data.tar.gz: 2d1b85f6564c8916ae3b8a51290df8bf95d75156b2bb4b595466a502d78dd0f7f20260a14914ce482bd89af963b9b89e23207640c6df6a004616fcd9d0f62ff8
6
+ metadata.gz: 7999a0f4658eea199733230c20760c6bffcfc7ababae6d66fa86c9ea938fe19ffc81cc5beaa09538c56058454d1c301e28de20814d694260fb3e1446a50e066b
7
+ data.tar.gz: d435617ce3e6c318245d97ab70a7bd82dc634f70d70e93d0727fc67df37028e19ff8f99cc5096a3718baf6f6bbd6337e112416e5eee70379694a1d24acd88b70
@@ -25,8 +25,13 @@ module CanvasSync::Concerns
25
25
  end
26
26
 
27
27
  def process_live_event(event_type, payload, metadata)
28
- api_response = request_from_api
29
- assign_from_api_params(api_response)
28
+ if self.has_attribute?(:workflow_state) && payload['workflow_state'].present? && payload['workflow_state'] == 'deleted'
29
+ # API will respond with 404, so just update the workflow_state
30
+ update(workflow_state: payload['workflow_state'])
31
+ else
32
+ api_response = request_from_api
33
+ assign_from_api_params(api_response)
34
+ end
30
35
  end
31
36
  end
32
37
 
@@ -1,3 +1,3 @@
1
1
  module CanvasSync
2
- VERSION = "0.21.0".freeze
2
+ VERSION = "0.21.1".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canvas_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.0
4
+ version: 0.21.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Instructure CustomDev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-03 00:00:00.000000000 Z
11
+ date: 2024-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails