Repository: oppia/oppia

Issue:
Add types for Object Factories 
NOTE - @nishantwrp will be working on this as a part of his GSoC project.

At present many dicts in frontend have underscore_cased keys (like [here](https://github.com/oppia/oppia/blob/develop/core/templates/dev/head/domain/topic/TopicObjectFactory.ts#L366)) which prevent explicit typing of the object as it raises tslint errors regarding the casing. Note that the backend also needs to be refactored accordingly to send underscore_case keys and also care has to be taken for the pylint rule against camelCase in favor of underscore_case.

Note: Typically, a frontend domain object needs to be created to provide a standalone representation for the object in the frontend. That domain object can be constructed using the backend dict. The field names of that domain object should all be lowerCamelCase.

The following files use the underscore_case dicts and need to be refactored:

- [ ] core/templates/dev/head/domain/feedback_message/FeedbackMessageSummaryObjectFactory.ts
- [ ] core/templates/dev/head/domain/feedback_thread/FeedbackThreadObjectFactory.ts
- [ ] core/templates/dev/head/domain/learner_dashboard/LearnerDashboardActivityIdsObjectFactory.ts
- [ ] core/templates/dev/head/domain/skill/SkillRightsObjectFactory.ts
- [ ] core/templates/dev/head/domain/suggestion/SuggestionObjectFactory.ts
- [ ] core/templates/dev/head/domain/user/UserInfoObjectFactory.ts
- [ ] core/templates/dev/head/domain/utilities/AudioLanguageObjectFactory.ts - (#7365 - @RafayGhafoor)
- [x] core/templates/dev/head/domain/utilities/AutogeneratedAudioLanguageObjectFactory.ts
- [ ] core/templates/dev/head/domain/exploration/AnswerStatsObjectFactory.ts
- [ ] core/templates/dev/head/services/StateTopAnswersStatsServiceSpec.ts
- [ ] core/templates/dev/head/domain/collection/CollectionRightsObjectFactory.ts @Arnesh07 
- [ ] core/templates/dev/head/domain/collection/CollectionPlaythroughObjectFactory.ts
- [ ] core/templates/dev/head/domain/statistics/PlaythroughIssueObjectFactory.ts
- [ ] core/templates/dev/head/domain/editor/undo_redo/ChangeObjectFactory.ts
- [ ] core/templates/dev/head/domain/exploration/ParamChangeObjectFactory.ts
- [ ] core/templates/dev/head/domain/exploration/ParamTypeObjectFactory.ts
- [ ] core/templates/dev/head/domain/exploration/VoiceoverObjectFactory.ts
- [ ] core/templates/dev/head/domain/learner_dashboard/LearnerDashboardActivityIdsObjectFactory.ts
- [ ] core/templates/dev/head/domain/skill/SkillRightsObjectFactory.ts
- [ ] core/templates/dev/head/services/ImprovementsService.ts
- [ ] core/templates/dev/head/services/StateTopAnswersStatsServiceSpec.ts
- [ ] core/templates/dev/head/pages/exploration-editor-page/history-tab/services/version-tree.service.ts
- [ ] core/templates/dev/head/domain/topic/TopicRightsObjectFactory.ts
- [ ] core/templates/dev/head/domain/classifier/ClassifierObjectFactory.ts
- [ ] core/templates/dev/head/domain/exploration/WrittenTranslationObjectFactory.ts
- [ ] core/templates/dev/head/domain/exploration/RuleObjectFactory.ts
- [ ] core/templates/dev/head/services/ExplorationFeaturesService.ts
- [ ] core/templates/dev/head/domain/exploration/SubtitledHtmlObjectFactory.ts
- [ ] core/templates/dev/head/domain/exploration/RecordedVoiceoversObjectFactory.ts
- [ ] core/templates/dev/head/domain/topic/SubtopicPageContentsObjectFactory.ts
- [ ] core/templates/dev/head/domain/topic/SubtopicPageObjectFactory.ts
- [ ] core/templates/dev/head/domain/exploration/ParamSpecObjectFactory.ts
- [ ] core/templates/dev/head/domain/exploration/WrittenTranslationsObjectFactory.ts
- [ ] core/templates/dev/head/domain/exploration/HintObjectFactory.ts
- [ ] core/templates/dev/head/domain/statistics/LearnerActionObjectFactory.ts
- [ ] core/templates/dev/head/domain/story/StoryNodeObjectFactory.ts
- [ ] core/templates/dev/head/domain/collection/CollectionNodeObjectFactory.ts
- [ ] core/templates/dev/head/domain/exploration/AnswerGroupObjectFactory.ts
- [ ] extensions/interactions/Continue/directives/ContinueValidationService.ts
- [ ] extensions/interactions/ImageClickInput/directives/ImageClickInputValidationService.ts
- [ ] extensions/interactions/EndExploration/directives/EndExplorationValidationService.ts
- [ ] extensions/interactions/GraphInput/directives/GraphInputValidationService.t
- [ ] extensions/interactions/CodeRepl/directives/CodeReplValidationService.ts
- [ ] extensions/interactions/PencilCodeEditor/directives/PencilCodeEditorValidationService.ts
- [ ] extensions/interactions/MathExpressionInput/directives/MathExpressionInputValidationService.ts
- [ ] extensions/interactions/SetInput/directives/SetInputValidationService.ts
- [ ] extensions/interactions/DragAndDropSortInput/directives/DragAndDropSortInputValidationService.ts
- [ ] extensions/interactions/MusicNotesInput/directives/MusicNotesInputValidationService.ts
- [ ] extensions/interactions/NumericInput/directives/NumericInputValidationService.ts
- [ ] extensions/interactions/MultipleChoiceInput/directives/MultipleChoiceInputValidationService.ts
- [ ] extensions/interactions/LogicProof/directives/LogicProofValidationService.ts
- [ ] extensions/classifiers/SVMPredictionService.ts
- [ ] core/templates/dev/head/domain/story/StoryContentsObjectFactory.ts
- [ ] core/templates/dev/head/domain/collection/CollectionObjectFactory.ts
- [ ] core/templates/dev/head/domain/topic/StoryReferenceObjectFactory.ts
- [ ] core/templates/dev/head/components/state-editor/state-editor-properties-services/state-editor.service.ts
- [ ] core/templates/dev/head/domain/topic/TopicObjectFactory.ts
- [ ] core/templates/dev/head/domain/skill/ConceptCardObjectFactory.ts
Add types for Object Factories 
NOTE - @nishantwrp will be working on this as a part of his GSoC project.

At present many dicts in frontend have underscore_cased keys (like [here](https://github.com/oppia/oppia/blob/develop/core/templates/dev/head/domain/topic/TopicObjectFactory.ts#L366)) which prevent explicit typing of the object as it raises tslint errors regarding the casing. Note that the backend also needs to be refactored accordingly to send underscore_case keys and also care has to be taken for the pylint rule against camelCase in favor of underscore_case.

Note: Typically, a frontend domain object needs to be created to provide a standalone representation for the object in the frontend. That domain object can be constructed using the backend dict. The field names of that domain object should all be lowerCamelCase.

The following files use the underscore_case dicts and need to be refactored:

- [ ] core/templates/dev/head/domain/feedback_message/FeedbackMessageSummaryObjectFactory.ts
- [ ] core/templates/dev/head/domain/feedback_thread/FeedbackThreadObjectFactory.ts
- [ ] core/templates/dev/head/domain/learner_dashboard/LearnerDashboardActivityIdsObjectFactory.ts
- [ ] core/templates/dev/head/domain/skill/SkillRightsObjectFactory.ts
- [ ] core/templates/dev/head/domain/suggestion/SuggestionObjectFactory.ts
- [ ] core/templates/dev/head/domain/user/UserInfoObjectFactory.ts
- [ ] core/templates/dev/head/domain/utilities/AudioLanguageObjectFactory.ts - (#7365 - @RafayGhafoor)
- [x] core/templates/dev/head/domain/utilities/AutogeneratedAudioLanguageObjectFactory.ts
- [ ] core/templates/dev/head/domain/exploration/AnswerStatsObjectFactory.ts
- [ ] core/templates/dev/head/services/StateTopAnswersStatsServiceSpec.ts
- [ ] core/templates/dev/head/domain/collection/CollectionRightsObjectFactory.ts @Arnesh07 
- [ ] core/templates/dev/head/domain/collection/CollectionPlaythroughObjectFactory.ts
- [ ] core/templates/dev/head/domain/statistics/PlaythroughIssueObjectFactory.ts
- [ ] core/templates/dev/head/domain/editor/undo_redo/ChangeObjectFactory.ts
- [ ] core/templates/dev/head/domain/exploration/ParamChangeObjectFactory.ts
- [ ] core/templates/dev/head/domain/exploration/ParamTypeObjectFactory.ts
- [ ] core/templates/dev/head/domain/exploration/VoiceoverObjectFactory.ts
- [ ] core/templates/dev/head/domain/learner_dashboard/LearnerDashboardActivityIdsObjectFactory.ts
- [ ] core/templates/dev/head/domain/skill/SkillRightsObjectFactory.ts
- [ ] core/templates/dev/head/services/ImprovementsService.ts
- [ ] core/templates/dev/head/services/StateTopAnswersStatsServiceSpec.ts
- [ ] core/templates/dev/head/pages/exploration-editor-page/history-tab/services/version-tree.service.ts
- [ ] core/templates/dev/head/domain/topic/TopicRightsObjectFactory.ts
- [ ] core/templates/dev/head/domain/classifier/ClassifierObjectFactory.ts
- [ ] core/templates/dev/head/domain/exploration/WrittenTranslationObjectFactory.ts
- [ ] core/templates/dev/head/domain/exploration/RuleObjectFactory.ts
- [ ] core/templates/dev/head/services/ExplorationFeaturesService.ts
- [ ] core/templates/dev/head/domain/exploration/SubtitledHtmlObjectFactory.ts
- [ ] core/templates/dev/head/domain/exploration/RecordedVoiceoversObjectFactory.ts
- [ ] core/templates/dev/head/domain/topic/SubtopicPageContentsObjectFactory.ts
- [ ] core/templates/dev/head/domain/topic/SubtopicPageObjectFactory.ts
- [ ] core/templates/dev/head/domain/exploration/ParamSpecObjectFactory.ts
- [ ] core/templates/dev/head/domain/exploration/WrittenTranslationsObjectFactory.ts
- [ ] core/templates/dev/head/domain/exploration/HintObjectFactory.ts
- [ ] core/templates/dev/head/domain/statistics/LearnerActionObjectFactory.ts
- [ ] core/templates/dev/head/domain/story/StoryNodeObjectFactory.ts
- [ ] core/templates/dev/head/domain/collection/CollectionNodeObjectFactory.ts
- [ ] core/templates/dev/head/domain/exploration/AnswerGroupObjectFactory.ts
- [ ] extensions/interactions/Continue/directives/ContinueValidationService.ts
- [ ] extensions/interactions/ImageClickInput/directives/ImageClickInputValidationService.ts
- [ ] extensions/interactions/EndExploration/directives/EndExplorationValidationService.ts
- [ ] extensions/interactions/GraphInput/directives/GraphInputValidationService.t
- [ ] extensions/interactions/CodeRepl/directives/CodeReplValidationService.ts
- [ ] extensions/interactions/PencilCodeEditor/directives/PencilCodeEditorValidationService.ts
- [ ] extensions/interactions/MathExpressionInput/directives/MathExpressionInputValidationService.ts
- [ ] extensions/interactions/SetInput/directives/SetInputValidationService.ts
- [ ] extensions/interactions/DragAndDropSortInput/directives/DragAndDropSortInputValidationService.ts
- [ ] extensions/interactions/MusicNotesInput/directives/MusicNotesInputValidationService.ts
- [ ] extensions/interactions/NumericInput/directives/NumericInputValidationService.ts
- [ ] extensions/interactions/MultipleChoiceInput/directives/MultipleChoiceInputValidationService.ts
- [ ] extensions/interactions/LogicProof/directives/LogicProofValidationService.ts
- [ ] extensions/classifiers/SVMPredictionService.ts
- [ ] core/templates/dev/head/domain/story/StoryContentsObjectFactory.ts
- [ ] core/templates/dev/head/domain/collection/CollectionObjectFactory.ts
- [ ] core/templates/dev/head/domain/topic/StoryReferenceObjectFactory.ts
- [ ] core/templates/dev/head/components/state-editor/state-editor-properties-services/state-editor.service.ts
- [ ] core/templates/dev/head/domain/topic/TopicObjectFactory.ts
- [ ] core/templates/dev/head/domain/skill/ConceptCardObjectFactory.ts


Discussion:
@YashJipkate, I would like to work on this issue.
@YashJipkate, Can you please suggest some part of this issue to @RafayGhafoor?  
@RafayGhafoor @DubeySandeep Sorry for the delay. You can go for core/templates/dev/head/domain/utilities/AudioLanguageObjectFactory.ts as it has just one underscore_cased key so you might get an idea.
> @RafayGhafoor @DubeySandeep Sorry for the delay. You can go for core/templates/dev/head/domain/utilities/AudioLanguageObjectFactory.ts as it has just one underscore_cased key so you might get an idea.

Please [check](https://github.com/oppia/oppia/pull/7365), thanks!
@YashJipkate, Can you please assign me other parts of this issue? Previous one has been completed.
@RafayGhafoor now that you have an idea of how to do it, you can take a look at the other files and check which ones you can handle.
@YashJipkate, Can I send PR for multiple files at once or are they required to be refactored individually? (one per PR)
You can do either way, one that suits you. Though I think individual PRs would be a better idea.
~Hello - I'm going to claim `core/templates/dev/head/domain/skill/ConceptCardObjectFactory.ts` to work on today for the Grace Hopper Open Source Codeathon day~

Unclaiming - on vacation and don't want to slow anyone down.
Hi @YashJipkate, I would like to work on this issue. Can I take this file` core/templates/dev/head/domain/exploration/ParamChangeObjectFactory.ts
` If it has not been assigned to anyone else.
I would like to work on core/templates/dev/head/domain/feedback_message/FeedbackMessageSummaryObjectFactory.ts

@YashJipkate, I would like to work on this issue. Can you suggest some part of it to me?

Hi! I would like to work on core/templates/dev/head/domain/statistics/LearnerActionObjectFactory.ts. If anyone is already working on it, please let me know.
Hi. I would like to work on `core/templates/dev/head/domain/story/StoryContentsObjectFactory.ts`.

Can it be assigned to me?
Hello, 
I would like to work on this can you please guide 
Thanks

@YashJipkate i would like to work on this issue , can you suggest?
@YashJipkate , I would like to work on ` core/templates/dev/head/domain/topic/SubtopicPageContentsObjectFactory.ts`, can you please assign it to me?
@YashJipkate , It seems there are no underscore dicts in `core/templates/dev/head/domain/exploration/AnswerStatsObjectFactory.ts`
@nishantwrp Could you please rephrase this issue to something like: "Add types for these files…"
hi @nishantwrp, it's not clear from issue description or your PRs which types are being covered. Unfortunately because of this I spent a lot of time writing #9342 to handle 50+ file changes... could you please explicitly list out which types do not need work so I can focus on the ones that do?
Hi, @brianrodri Thanks a lot for your PR. Currently all the files with `any` need to be worked on.
Which files are covered by #9345 and #9349?
I've randomly covered some of the files

#9345 
"core/templates/domain/classifier/ClassifierObjectFactory.ts",
 "core/templates/domain/exploration/WrittenTranslationObjectFactory.ts",
    "core/templates/domain/exploration/WrittenTranslationsObjectFactory.ts",
    "core/templates/domain/feedback_message/FeedbackMessageSummaryObjectFactory.ts",
    "core/templates/domain/feedback_message/ThreadMessageObjectFactory.ts",
    "core/templates/domain/feedback_thread/FeedbackThreadObjectFactory.ts",
    "core/templates/domain/feedback_thread/FeedbackThreadSummaryObjectFactory.ts",
    "core/templates/domain/learner_dashboard/LearnerDashboardActivityIdsObjectFactory.ts",
    "core/templates/domain/learner_dashboard/LearnerDashboardActivityIdsObjectFactorySpec.ts",
  "core/templates/domain/story/StoryContentsObjectFactory.ts",
    "core/templates/domain/story/StoryNodeObjectFactory.ts",
 "core/templates/domain/story_viewer/ReadOnlyStoryNodeObjectFactory.ts",
  "core/templates/domain/topic/StoryReferenceObjectFactory.ts",
    "core/templates/domain/topic/SubtopicObjectFactory.ts",
  "core/templates/domain/topic/TopicObjectFactory.ts",
    "core/templates/domain/topic/TopicRightsObjectFactory.ts",
    "core/templates/domain/topic/TopicSummaryObjectFactory.ts",
 "core/templates/domain/user/UserInfoObjectFactory.ts",
 "core/templates/pages/exploration-player-page/services/state-classifier-mapping.service.ts",
  "extensions/classifiers/svm-prediction.service.ts",

#9349 
"core/templates/domain/collection/CollectionPlaythroughObjectFactory.ts",
    "core/templates/domain/collection/CollectionRightsObjectFactory.ts",
"core/templates/domain/exploration/HintObjectFactory.ts",
 "core/templates/domain/exploration/ParamSpecObjectFactory.ts",
    "core/templates/domain/exploration/ParamSpecsObjectFactory.ts",
  "core/templates/domain/subtopic_viewer/ReadOnlySubtopicPageObjectFactory.ts",
 "core/templates/domain/topic/SubtopicPageContentsObjectFactory.ts",
 "core/templates/domain/utilities/AudioLanguageObjectFactory.ts",

And I am soon going to make a PR for `RuleObjectFactory`
@YashJipkate, I would like to work on this issue.
@YashJipkate, Can you please suggest some part of this issue to @RafayGhafoor?  
@RafayGhafoor @DubeySandeep Sorry for the delay. You can go for core/templates/dev/head/domain/utilities/AudioLanguageObjectFactory.ts as it has just one underscore_cased key so you might get an idea.
> @RafayGhafoor @DubeySandeep Sorry for the delay. You can go for core/templates/dev/head/domain/utilities/AudioLanguageObjectFactory.ts as it has just one underscore_cased key so you might get an idea.

Please [check](https://github.com/oppia/oppia/pull/7365), thanks!
@YashJipkate, Can you please assign me other parts of this issue? Previous one has been completed.
@RafayGhafoor now that you have an idea of how to do it, you can take a look at the other files and check which ones you can handle.
@YashJipkate, Can I send PR for multiple files at once or are they required to be refactored individually? (one per PR)
You can do either way, one that suits you. Though I think individual PRs would be a better idea.
~Hello - I'm going to claim `core/templates/dev/head/domain/skill/ConceptCardObjectFactory.ts` to work on today for the Grace Hopper Open Source Codeathon day~

Unclaiming - on vacation and don't want to slow anyone down.
Hi @YashJipkate, I would like to work on this issue. Can I take this file` core/templates/dev/head/domain/exploration/ParamChangeObjectFactory.ts
` If it has not been assigned to anyone else.
I would like to work on core/templates/dev/head/domain/feedback_message/FeedbackMessageSummaryObjectFactory.ts

@YashJipkate, I would like to work on this issue. Can you suggest some part of it to me?

Hi! I would like to work on core/templates/dev/head/domain/statistics/LearnerActionObjectFactory.ts. If anyone is already working on it, please let me know.
Hi. I would like to work on `core/templates/dev/head/domain/story/StoryContentsObjectFactory.ts`.

Can it be assigned to me?
Hello, 
I would like to work on this can you please guide 
Thanks

@YashJipkate i would like to work on this issue , can you suggest?
@YashJipkate , I would like to work on ` core/templates/dev/head/domain/topic/SubtopicPageContentsObjectFactory.ts`, can you please assign it to me?
@YashJipkate , It seems there are no underscore dicts in `core/templates/dev/head/domain/exploration/AnswerStatsObjectFactory.ts`
@nishantwrp Could you please rephrase this issue to something like: "Add types for these files…"
hi @nishantwrp, it's not clear from issue description or your PRs which types are being covered. Unfortunately because of this I spent a lot of time writing #9342 to handle 50+ file changes... could you please explicitly list out which types do not need work so I can focus on the ones that do?
Hi, @brianrodri Thanks a lot for your PR. Currently all the files with `any` need to be worked on.
Which files are covered by #9345 and #9349?
I've randomly covered some of the files

#9345 
"core/templates/domain/classifier/ClassifierObjectFactory.ts",
 "core/templates/domain/exploration/WrittenTranslationObjectFactory.ts",
    "core/templates/domain/exploration/WrittenTranslationsObjectFactory.ts",
    "core/templates/domain/feedback_message/FeedbackMessageSummaryObjectFactory.ts",
    "core/templates/domain/feedback_message/ThreadMessageObjectFactory.ts",
    "core/templates/domain/feedback_thread/FeedbackThreadObjectFactory.ts",
    "core/templates/domain/feedback_thread/FeedbackThreadSummaryObjectFactory.ts",
    "core/templates/domain/learner_dashboard/LearnerDashboardActivityIdsObjectFactory.ts",
    "core/templates/domain/learner_dashboard/LearnerDashboardActivityIdsObjectFactorySpec.ts",
  "core/templates/domain/story/StoryContentsObjectFactory.ts",
    "core/templates/domain/story/StoryNodeObjectFactory.ts",
 "core/templates/domain/story_viewer/ReadOnlyStoryNodeObjectFactory.ts",
  "core/templates/domain/topic/StoryReferenceObjectFactory.ts",
    "core/templates/domain/topic/SubtopicObjectFactory.ts",
  "core/templates/domain/topic/TopicObjectFactory.ts",
    "core/templates/domain/topic/TopicRightsObjectFactory.ts",
    "core/templates/domain/topic/TopicSummaryObjectFactory.ts",
 "core/templates/domain/user/UserInfoObjectFactory.ts",
 "core/templates/pages/exploration-player-page/services/state-classifier-mapping.service.ts",
  "extensions/classifiers/svm-prediction.service.ts",

#9349 
"core/templates/domain/collection/CollectionPlaythroughObjectFactory.ts",
    "core/templates/domain/collection/CollectionRightsObjectFactory.ts",
"core/templates/domain/exploration/HintObjectFactory.ts",
 "core/templates/domain/exploration/ParamSpecObjectFactory.ts",
    "core/templates/domain/exploration/ParamSpecsObjectFactory.ts",
  "core/templates/domain/subtopic_viewer/ReadOnlySubtopicPageObjectFactory.ts",
 "core/templates/domain/topic/SubtopicPageContentsObjectFactory.ts",
 "core/templates/domain/utilities/AudioLanguageObjectFactory.ts",

And I am soon going to make a PR for `RuleObjectFactory`

Resolving patch:
diff --git a/core/controllers/topic_viewer.py b/core/controllers/topic_viewer.py
--- a/core/controllers/topic_viewer.py
+++ b/core/controllers/topic_viewer.py
@@ -74,13 +74,13 @@ def get(self, topic_name):
         canonical_story_dicts = []
         for story_summary in canonical_story_summaries:
             story_summary_dict = story_summary.to_human_readable_dict()
-            story_summary_dict['published'] = True
+            story_summary_dict['story_is_published'] = True
             canonical_story_dicts.append(story_summary_dict)
 
         additional_story_dicts = []
         for story_summary in additional_story_summaries:
             story_summary_dict = story_summary.to_human_readable_dict()
-            story_summary_dict['published'] = True
+            story_summary_dict['story_is_published'] = True
             additional_story_dicts.append(story_summary_dict)
 
         uncategorized_skill_ids = topic.get_all_uncategorized_skill_ids()


Test patch:
diff --git a/core/controllers/topic_viewer_test.py b/core/controllers/topic_viewer_test.py
--- a/core/controllers/topic_viewer_test.py
+++ b/core/controllers/topic_viewer_test.py
@@ -148,7 +148,7 @@ def test_get_with_no_user_logged_in(self):
                     'node_titles': self.story_1.node_titles,
                     'thumbnail_filename': None,
                     'thumbnail_bg_color': None,
-                    'published': True
+                    'story_is_published': True
                 }],
                 'additional_story_dicts': [{
                     'id': self.story_2.id,
@@ -157,7 +157,7 @@ def test_get_with_no_user_logged_in(self):
                     'node_titles': self.story_2.node_titles,
                     'thumbnail_filename': None,
                     'thumbnail_bg_color': None,
-                    'published': True
+                    'story_is_published': True
                 }],
                 'uncategorized_skill_ids': [self.skill_id_1],
                 'subtopics': [{
@@ -208,7 +208,7 @@ def test_get_with_user_logged_in(self):
                         'node_titles': self.story_1.node_titles,
                         'thumbnail_filename': None,
                         'thumbnail_bg_color': None,
-                        'published': True
+                        'story_is_published': True
                     }],
                     'additional_story_dicts': [{
                         'id': self.story_2.id,
@@ -217,7 +217,7 @@ def test_get_with_user_logged_in(self):
                         'node_titles': self.story_2.node_titles,
                         'thumbnail_filename': None,
                         'thumbnail_bg_color': None,
-                        'published': True
+                        'story_is_published': True
                     }],
                     'uncategorized_skill_ids': [self.skill_id_1],
                     'subtopics': [{