fix(story): ensure that the Model Codecs are always registered by tbouffard · Pull Request #749 · maxGraph/maxGraph

@tbouffard

Manually cleaning the codecs introduced side effects, and the Codecs were unavailable once a story was visited.
For example, display a story using the Model Codecs like Monitoring story, then going to another story and displaying
the Monitoring story again. In the latter, the model wasn't fill.

This was because ModelSerializer registers the Codecs but only once. If we unregistered the Codecs manually as we do
for stories, the ModelSerializer is currently unable to know it has to register the Codecs again (by forcing the registration).
The workaround is to force registration of Model Codecs before loading every story.

@tbouffard added the bug

Something isn't working

label

Apr 4, 2025

@tbouffard tbouffard marked this pull request as ready for review

April 4, 2025 19:13

@tbouffard tbouffard deleted the fix/story_load_codecs_after_global_unregistration branch

April 5, 2025 09:38