Skip to content

Comments

fix: truncate the display_name field to a maximum 255 characters#141

Open
MAAngamarca wants to merge 1 commit intopearson-release/olive.stagefrom
msa/fix-display-name
Open

fix: truncate the display_name field to a maximum 255 characters#141
MAAngamarca wants to merge 1 commit intopearson-release/olive.stagefrom
msa/fix-display-name

Conversation

@MAAngamarca
Copy link

Description

This PR amis to truncate display_name field to prevent the following error:
django.db.utils.DataError: (1406, "Data too long for column 'display_name' at row 1")
This error occurs when attempting to create or update an XBlockCache.

Testing instructions

Create a course with Blank Common Problem and set the following name:
Duplicate of 'Duplicate of 'Duplicate of 'Duplicate of 'Duplicate of 'Duplicate of 'Duplicate of 'Duplicate of 'Duplicate of 'Duplicate of 'Duplicate of 'Duplicate of 'Duplicate of 'Duplicate of 'Duplicate of 'Duplicate of 'Blank Common Problem''''''''''''''''

From a cms shell, run the following code:

from openedx.core.djangoapps.bookmarks.tasks import update_xblocks_cache
update_xblocks_cache(<course-id>)

And the xblock cached should be created sucessfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant