Steps to reproduce
- Go to Studio and create a new
LTI Consumer XBlock.
- Set the
Configuration Type to Reusable Configuration.
- Provide a random
LTI Reusable Configuration ID.
What happens
The XBlock break with Error: (1048, "Column 'version' cannot be null"). The relevant part of the traceback is:
File "/edx/shared-src/xblock-lti-consumer/lti_consumer/lti_xblock.py", line 1177, in author_view
return self.student_view(context)
File "/edx/shared-src/xblock-lti-consumer/lti_consumer/lti_xblock.py", line 1227, in student_view
context.update(self._get_context_for_template())
File "/edx/shared-src/xblock-lti-consumer/lti_consumer/lti_xblock.py", line 1730, in _get_context_for_template
lti_consumer = self._get_lti_consumer()
File "/edx/shared-src/xblock-lti-consumer/lti_consumer/lti_xblock.py", line 1128, in _get_lti_consumer
return get_lti_consumer(config_id_for_block(self))
File "/edx/shared-src/xblock-lti-consumer/lti_consumer/api.py", line 96, in config_id_for_block
config = _get_lti_config_for_block(block)
File "/edx/shared-src/xblock-lti-consumer/lti_consumer/api.py", line 76, in _get_lti_config_for_block
lti_config = _get_or_create_local_lti_config(
File "/edx/shared-src/xblock-lti-consumer/lti_consumer/api.py", line 46, in _get_or_create_local_lti_config
lti_config.save()
File "/edx/shared-src/xblock-lti-consumer/lti_consumer/models.py", line 313, in save
super().save(*args, **kwargs)
What should happen?
The XBlock should display an error about an invalid external configuration ID.
Note: Ensure that students (i.e., users without staff permissions) cannot see this error in LMS.
Originally posted by @Agrendalath in #390 (comment)
Steps to reproduce
LTI ConsumerXBlock.Configuration TypetoReusable Configuration.LTI Reusable Configuration ID.What happens
The XBlock break with
Error: (1048, "Column 'version' cannot be null"). The relevant part of the traceback is:What should happen?
The XBlock should display an error about an invalid external configuration ID.
Note: Ensure that students (i.e., users without staff permissions) cannot see this error in LMS.
Originally posted by @Agrendalath in #390 (comment)