Skip to content
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

fix: metadata fields for migration rules #2163

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,14 @@ def build_external_resource(
CONTENT_TYPE_EXTERNAL_RESOURCE, use_defaults=True
)
metadata["external_url"] = url
metadata["has_external_licence_warning"] = not is_ocw_domain_url(url)
metadata["has_external_license_warning"] = not is_ocw_domain_url(url)

# title is a special field. By default the value of title
# is stored in `website_content.title` field. Having both,
# `website_content.title` and `website_content.metadata['title']`,
# not only confuses the developer but also some UI components like
# navmenu.
metadata.pop("title", None)

config_item = site_config.find_item_by_name(CONTENT_TYPE_EXTERNAL_RESOURCE)
text_id = uuid_string()
Expand Down
Loading