Skip to content

Prevent modification of contentnode extra_fields during publish#3804

Merged
rtibbles merged 1 commit intolearningequality:hotfixesfrom
rtibbles:no_modify_publish
Nov 9, 2022
Merged

Prevent modification of contentnode extra_fields during publish#3804
rtibbles merged 1 commit intolearningequality:hotfixesfrom
rtibbles:no_modify_publish

Conversation

@rtibbles
Copy link
Copy Markdown
Member

@rtibbles rtibbles commented Nov 9, 2022

Summary

Description of the change(s) you made

  • When the thumbnail encoding is not set on a content node at publish time, it gets generated from its thumbnail file, and set on the node. This node is then saved.
  • Adding the extra_field migration standardization has caused issues, because it modifies the extra_fields dict during the transformation, so when it got saved with a new thumbnail encoding these updates also got saved
  • This fixes this issue by restricting the save to only the thumbnail_encoding field
  • Adds regression tests for both legacy and new style exercises

Fixes #3799

@rtibbles rtibbles requested a review from bjester November 9, 2022 04:29
@rtibbles rtibbles merged commit f47e6ab into learningequality:hotfixes Nov 9, 2022
@pcenov
Copy link
Copy Markdown
Member

pcenov commented Nov 9, 2022

I'm no longer able to replicate the issue described in #3799 and modifying the completion criteria of an exercise + saving or editing is functioning correctly now.

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.

2 participants