Skip to content

Commit d5a76ed

Browse files
mfarhan943xitij2000
authored andcommitted
fix: handle AttributeError in exception clause (openedx#36317)
(cherry picked from commit 988801f)
1 parent ba085df commit d5a76ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cms/djangoapps/contentstore/xblock_storage_handlers/view_handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1562,7 +1562,7 @@ def _get_release_date(xblock, user=None):
15621562
reset_to_default = False
15631563
try:
15641564
reset_to_default = xblock.start.year < 1900
1565-
except ValueError:
1565+
except (ValueError, AttributeError):
15661566
# For old mongo courses, accessing the start attribute calls `to_json()`,
15671567
# which raises a `ValueError` for years < 1900.
15681568
reset_to_default = True

0 commit comments

Comments
 (0)