-
Notifications
You must be signed in to change notification settings - Fork 3
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
Course publish without metadata #2015
Conversation
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.
Can we add or update the tests in websites/serializers_test.py
to ensure that a value for has_site_metadata
is serialized and present?
Similarly, should we add or update tests in static/js/components/PublishDrawer.test.tsx
?
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.
Can we also add a warning message in websites/api.py get_content_warnings
?
For example
if not website.has_site_metadata:
messages.append(
"The course is missing metadata."
)
website.has_site_metadata is a property on the model class. Just for the sake of reusability.
I will reopen it to trigger CI. |
0c58343
to
6a4849f
Compare
5c34e17
to
72503f1
Compare
@HussainTaj-arbisoft Can I close this PR? |
…s has_site_metadata in static/js/components/PublishDrawer.test.tsx
72503f1
to
9a5ec4a
Compare
for more information, see https://pre-commit.ci
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.
At first I was not able to publish the course.
But then I noticed that this is the same file for which we have a PR here:
mitodl/ocw-hugo-themes#1274
I tried testing this PR by changing OCW_HUGO_THEMES_GIT
in constants.py
as you shared, to reflect the forked branch above and then upserted a new themes pipeline, and backpopulated a course.
It then worked to publish. Can you please confirm both of the PRs are supposed to be reviewed, and they're supposed to work together?
If so, can you please make sure the checks are not failing and the PR is ready to be reviewed.
This is the error:
Run shimataro/ssh-key-action@v2
with:
if_key_exists: replace
name: id_rsa
✅SSH directory "/home/runner/.ssh" has been created successfully.
Error: Error: Input required and not supplied: key
Recreated the PR here without fork, to get all checks up and running: #2183 |
What are the relevant tickets?
Fixes #1996
Description (What does it do?)
You can add content to a course and publish it in staging without ever visiting the Metadata section. Production, however will require metadata to be set.
Screenshots (if appropriate):
How can this be tested?
Additional Context
The
course-v2/layouts/partials/course_banner.html
file was changed in theocw-hugo-themes
repository. You can view the changes here