-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It seems like self.tabs is getting set to an empty set [] now rather tha... #481
It seems like self.tabs is getting set to an empty set [] now rather tha... #481
Conversation
…than None. This causes the tab defaulting to not populate, leading to crashes in the LMS if someone makes a new course with additional tabs (e.g. static tabs or pdf-textbooks)
@dmitchell can you review? Let's talk to Miki and Jay about cherry picking. I presume we want to wait until tests pass in any case. |
@@ -410,7 +410,7 @@ def __init__(self, *args, **kwargs): | |||
continue | |||
|
|||
# TODO check that this is still needed here and can't be by defaults. | |||
if self.tabs is None: | |||
if not self.tabs or (isinstance(self.tabs, list) and len(self.tabs) == 0): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if not self.tabs:
is sufficient. That's what I put into the release.
…s as expected. Also update factory to not override defaults on tabs array. Also simplfy self.tab test condition.
@dmitchell added unit test in CMS - there were already some tab tests there, so I just added a new one. Was able to repro bug in unit test and then "fix" it, confirming it via the unit test. |
@@ -38,16 +38,6 @@ def _create(cls, target_class, **kwargs): | |||
new_course.display_name = display_name | |||
|
|||
new_course.lms.start = datetime.datetime.now(UTC).replace(microsecond=0) | |||
new_course.tabs = kwargs.pop( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
👍 |
…lization It seems like self.tabs is getting set to an empty set [] now rather tha...
* kc/logistration_enable_footer_and_custom_form: Customize logistration registration page Show footer for logistration pages
Style(HMM): Change style for title
...n None. This causes the tab defaulting to not populate, leading to crashes in the LMS if someone makes a new course with additional tabs (e.g. static tabs or pdf-textbooks)