Skip to content

Conversation

@mbertrand
Copy link
Member

@mbertrand mbertrand commented Sep 5, 2024

What are the relevant tickets?

Closes https://github.com/mitodl/hq/issues/5261

Description (What does it do?)

Sorts news items by publish date instead of created date

Screenshots (if appropriate):

Screenshot 2024-09-05 155614

How can this be tested?

  • Run .manage.py backpopulate_news_data
  • Go to the "Stories" section of the home page. The news items should be sorted by reverse publish date.

@mbertrand mbertrand force-pushed the mb/news_sort_publish_dt branch from f57de5d to c7ad575 Compare September 5, 2024 19:51
@abeglova abeglova self-assigned this Sep 6, 2024
Copy link
Contributor

@abeglova abeglova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great! I did get

Running sloan_webinars_etl pipeline
[2024-09-06 14:49:25] ERROR 1 [root] utils.py:132 - [6f3781a9a9cd] - unparsable date received - ignoring 'January - December 2024'
Traceback (most recent call last):
  File "/src/news_events/etl/utils.py", line 128, in parse_date
    .replace(tzinfo=ZoneInfo("US/Eastern"))
     ^^^^^^^
AttributeError: 'NoneType' object has no attribute 'replace'
Processed sloan_webinars_etl pipeline with 2 items

While running backpopulate_news_events but that's not related to your pr

@mbertrand mbertrand force-pushed the mb/news_sort_publish_dt branch from c7ad575 to 9d0b9a6 Compare September 6, 2024 16:01
@mbertrand
Copy link
Member Author

Thanks @abeglova , that error message is expected when sloan has a placeholder webinar with no particular date specified, and it should be skipped over.

@mbertrand mbertrand merged commit 55320c5 into main Sep 6, 2024
@odlbot odlbot mentioned this pull request Sep 12, 2024
17 tasks
@rhysyngsun rhysyngsun deleted the mb/news_sort_publish_dt branch February 7, 2025 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants