From b62efa2269075587a9df585a212ec2c05fe7211a Mon Sep 17 00:00:00 2001 From: Zachary Hancock <zhancock@edx.org> Date: Fri, 2 Dec 2022 10:23:08 -0500 Subject: [PATCH] fix: remove lms specific waffle check (#312) * fix: remove lms specific waffle check --- CHANGELOG.rst | 4 ++++ lti_consumer/__init__.py | 2 +- lti_consumer/models.py | 5 ----- lti_consumer/tests/unit/test_models.py | 7 +------ 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b92ea47..892a9f1 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -16,6 +16,10 @@ Please See the [releases tab](https://github.com/openedx/xblock-lti-consumer/rel Unreleased ~~~~~~~~~~ +7.0.3 - 2022-12-02 +------------------ +* Removed check against LMS specific `database_config_enabled` in LtiConfiguration model. + 7.0.2 - 2022-11-29 ------------------ * Fix the LTI 1.1 Outcome Results Service to be able to tie an outcome pass back to a user when the user ID is an diff --git a/lti_consumer/__init__.py b/lti_consumer/__init__.py index 73e477f..fbc8e91 100644 --- a/lti_consumer/__init__.py +++ b/lti_consumer/__init__.py @@ -4,4 +4,4 @@ Runtime will load the XBlock class from here. from .apps import LTIConsumerApp from .lti_xblock import LtiConsumerXBlock -__version__ = '7.0.2' +__version__ = '7.0.3' diff --git a/lti_consumer/models.py b/lti_consumer/models.py index 15de62c..95b6863 100644 --- a/lti_consumer/models.py +++ b/lti_consumer/models.py @@ -29,7 +29,6 @@ from lti_consumer.utils import ( get_lti_ags_lineitems_url, get_lti_deeplinking_response_url, get_lti_nrps_context_membership_url, - database_config_enabled, ) log = logging.getLogger(__name__) @@ -240,10 +239,6 @@ class LtiConfiguration(models.Model): "config_store": _("LTI Configuration stores on XBlock needs a block location set."), }) if self.version == self.LTI_1P3 and self.config_store == self.CONFIG_ON_DB: - if not database_config_enabled(self.location.course_key): - raise ValidationError({ - "config_store": _("LTI Configuration stores on database is not enabled."), - }) if self.lti_1p3_tool_public_key == "" and self.lti_1p3_tool_keyset_url == "": raise ValidationError({ "config_store": _( diff --git a/lti_consumer/tests/unit/test_models.py b/lti_consumer/tests/unit/test_models.py index 9f9a37e..7453e04 100644 --- a/lti_consumer/tests/unit/test_models.py +++ b/lti_consumer/tests/unit/test_models.py @@ -359,15 +359,10 @@ class TestLtiConfigurationModel(TestCase): self.lti_1p3_config.config_store = self.lti_1p3_config.CONFIG_ON_DB - with patch("lti_consumer.models.database_config_enabled", return_value=False),\ - self.assertRaises(ValidationError): - self.lti_1p3_config_db.clean() - self.lti_1p3_config_db.lti_1p3_tool_keyset_url = '' self.lti_1p3_config_db.lti_1p3_tool_public_key = '' - with patch("lti_consumer.models.database_config_enabled", return_value=True),\ - self.assertRaises(ValidationError): + with self.assertRaises(ValidationError): self.lti_1p3_config_db.clean() self.lti_1p3_config.lti_1p3_proctoring_enabled = True -- GitLab