Skip to content

Commit

Permalink
Merge pull request #2204 from weather-gov/sspj/fix-syntax-error
Browse files Browse the repository at this point in the history
Fix broken link to WFO on weather story
  • Loading branch information
sspj-does-weather authored Jan 7, 2025
2 parents daf3631 + b7797e0 commit cb85f5d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/dev/json-api-upload-weather-story-example.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# This is a sample python script to demonstrate how to upload a WFO weather
# story, which contains several images. This script is for educational purposes
# only and is intended to aid as a helper for integration.
# Note: you'll need to create the config user (below) with "uploader" permissions.

# configuration options
endpoint = "http://localhost:8080"
Expand Down Expand Up @@ -49,7 +50,7 @@ def upload_content_type(small_image_id, full_image_id, data):
# because a Drupal content type expects a title, rename field_title to title
title = data.pop("field_title")
data.update({"title": title})
data.update({"field_office", wfo_code})
data.update({"field_office": wfo_code})

# process frontpage to be a proper True/False
frontpage = data.pop("field_frontpage")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<h4 class="wx-visual-h3 text-primary-dark margin-0 margin-bottom-2">{{ content.title }}</h4>
<p class="margin-0 margin-bottom-2">
{% set normalized_wfo = content.wfo_code | normalize_wfo %}
{% set wfo_url = '/offices/' . normalized_wfo %}
{% set wfo_url = '/offices/' ~ normalized_wfo %}
{{ "weather-story.text.created-by.01" | t({
"@date": content.updated.formatted,
"@wfo_url": wfo_url,
Expand Down

0 comments on commit cb85f5d

Please sign in to comment.