atomic_lti 1.8.4 → 1.8.5

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: 6d6721ea8f65b8dde67201355110c46bf4a1facfde6428e9e323bc2d7fc5d387
4
- data.tar.gz: 2731a248c9d96bba81d5514ae076130bb6d3e631dd79baa771c2552aac714ede
3
+ metadata.gz: ba4c43d0a67a951d858b5610d4b7a26a4b0898c863113c515d554f961d172131
4
+ data.tar.gz: cdf108a92d6e62a73b0294a38badb1ebd519de71520bf4f2ef5bb027de4fab21
5
5
  SHA512:
6
- metadata.gz: 67296ec1f021a201dc631db13ed1cffdd31c026dd3fb5850d4c86e56de0243ab468b1caa5fab4f8042a4acebe353210b19ba95714eb6f1c094e2124cd3c1819a
7
- data.tar.gz: 8b83c8d9a72d59032312fd095e67783ea29790329e9de74f04bf611667fa380ceea51f40f238142efbbe7a1507b2c04bd0029ec8be92763f2529fea425961eec
6
+ metadata.gz: 33fe99f4b5131ed6df49d4d36ee87058416c100f7bfc3a0fc06b163a6de8c3d30336a8260347d4d4c9db4b028e4e83b000582f94797254b932ff6433ea998ea4
7
+ data.tar.gz: 9b0812047d37e222c6b49e7abffe288afe7c0836c2eb15c970d97ae50d3446c348f5b64cdbbc6eb70848d378a40893be518f084b9d97e85cb8d455080b04a63f
@@ -293,19 +293,25 @@ module AtomicLti
293
293
  title = id_token[AtomicLti::Definitions::CONTEXT_CLAIM]["title"]
294
294
  types = id_token[AtomicLti::Definitions::CONTEXT_CLAIM]["type"]
295
295
 
296
- AtomicLti::Context.create_with(
297
- label: label,
298
- title: title,
299
- types: types,
300
- ).find_or_create_by!(
301
- iss: iss,
302
- deployment_id: deployment_id,
303
- context_id: context_id,
304
- ).update!(
305
- label: label,
306
- title: title,
307
- types: types,
308
- )
296
+ begin
297
+ AtomicLti::Context.create_with(
298
+ label: label,
299
+ title: title,
300
+ types: types,
301
+ ).find_or_create_by!(
302
+ iss: iss,
303
+ deployment_id: deployment_id,
304
+ context_id: context_id,
305
+ ).update!(
306
+ label: label,
307
+ title: title,
308
+ types: types,
309
+ )
310
+ rescue ActiveRecord::RecordNotUnique
311
+ # Throw away not unique exceptions, this only happens with concurrent launches
312
+ # and this is just maintaining the Context record, nothing uses the return
313
+ # value
314
+ end
309
315
  else
310
316
  Rails.logger.info("No context claim recieved: #{id_token}")
311
317
  end
@@ -1,3 +1,3 @@
1
1
  module AtomicLti
2
- VERSION = "1.8.4".freeze
2
+ VERSION = "1.8.5".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atomic_lti
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.4
4
+ version: 1.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Petro
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-06-17 00:00:00.000000000 Z
13
+ date: 2024-06-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: pg