-
Notifications
You must be signed in to change notification settings - Fork 17
move books into subkey of block #1628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
books/models.py
Outdated
@@ -74,6 +74,7 @@ def get_book_data(book): | |||
'has_faculty_resources': has_faculty_resources, | |||
'has_student_resources': has_student_resources, | |||
'assignable_book': book.assignable_book, | |||
'promote_snippet': book.promote_snippet, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will this naturally come through in the format defined below? its expected to be
{
id: number;
name: string;
description: string;
image: string;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, there is a promote snippet on calc 1, which I added to the landing page - it's not even showing up 👀
https://dev.openstax.org/apps/cms/api/v2/pages/562/ (last book)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two books on there are marked as retired. not sure if you want to hide books that are retired like the rest of the site does
i'll leave them there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the snippet, if you look at the calc response directly https://dev.openstax.org/apps/cms/api/v2/pages/74/ it definitely shows it. is in this context is book.promote_snippet
maybe not loaded?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for retired books, since we're explicitly choosing them i think we should leave them until they're unselected
@mwvolo i forget how to do this, do i need to run a script to create an auto generated migration file?
making this change to move the book list into a subkey of the block value so that we can add other fields (like config) later if we need to
fe pr https://github.com/openstax/os-webview/pull/2736/files
https://openstax.atlassian.net/browse/CORE-900