diff --git a/openedx/core/djangoapps/bookmarks/tasks.py b/openedx/core/djangoapps/bookmarks/tasks.py index 836335c1289c..d6629ddef6f2 100644 --- a/openedx/core/djangoapps/bookmarks/tasks.py +++ b/openedx/core/djangoapps/bookmarks/tasks.py @@ -119,7 +119,7 @@ def update_block_cache_if_needed(block_cache, block_data): paths = _paths_from_data(block_data['paths']) if block_cache.display_name != block_data['display_name'] or not paths_equal(block_cache.paths, paths): log.info('Updating XBlockCache with usage_key: %s', str(block_cache.usage_key)) - block_cache.display_name = block_data['display_name'] + block_cache.display_name = block_data['display_name'][:255] block_cache.paths = paths block_cache.save() @@ -136,7 +136,7 @@ def update_block_cache_if_needed(block_cache, block_data): log.info('Creating XBlockCache with usage_key: %s', str(block_data['usage_key'])) block_cache, created = XBlockCache.objects.get_or_create(usage_key=block_data['usage_key'], defaults={ 'course_key': course_key, - 'display_name': block_data['display_name'], + 'display_name': block_data['display_name'][:255], 'paths': paths, })