Skip to content

Commit 418b1e3

Browse files
authored
Merge pull request #309 from openedx/ashultz0/fix-compat-outside-of-block
fix: do not attempt to load the block just to look at the location
2 parents eb5f71a + 9807de4 commit 418b1e3

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

CHANGELOG.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ Please See the [releases tab](https://github.com/openedx/xblock-lti-consumer/rel
1616
Unreleased
1717
~~~~~~~~~~
1818

19+
=======
20+
7.0.1 - 2022-11-29
21+
------------------
22+
23+
Fix LtiConfiguration clean method to look only at location so that it can work in environments that cannot load the block.
24+
1925
7.0.0 - 2022-11-29
2026
------------------
2127
* Refactor anonymous user to real user rebinding function to use `rebind_user` service.

lti_consumer/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
from .apps import LTIConsumerApp
55
from .lti_xblock import LtiConsumerXBlock
66

7-
__version__ = '7.0.0'
7+
__version__ = '7.0.1'

lti_consumer/models.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,7 @@ def clean(self):
240240
"config_store": _("LTI Configuration stores on XBlock needs a block location set."),
241241
})
242242
if self.version == self.LTI_1P3 and self.config_store == self.CONFIG_ON_DB:
243-
block = compat.load_enough_xblock(self.location)
244-
if not database_config_enabled(block.scope_ids.usage_id.context_key):
243+
if not database_config_enabled(self.location.course_key):
245244
raise ValidationError({
246245
"config_store": _("LTI Configuration stores on database is not enabled."),
247246
})

0 commit comments

Comments
 (0)