Skip to content

Commit

Permalink
Merge pull request #816 from uktrade/fix-as-opps-no-published-date
Browse files Browse the repository at this point in the history
fix: don't fail Activity Stream endpoint if an opportunity does not have a first_published_at date - part 2
  • Loading branch information
rafa-garcia authored Nov 3, 2021
2 parents 445538f + 0bb6aa8 commit 0f52ebe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/api/activity_stream_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def opportunity_object(country_names, service_provider_names, opportunity)
'id': obj_id,
'name': opportunity.title,
'url': opportunity_url(opportunity, host: Figaro.env.DOMAIN),
'published': opportunity.first_published_at&.to_datetime.rfc3339,
'published': opportunity.first_published_at&.to_datetime&.rfc3339,
'endTime': opportunity.response_due_on.to_datetime.rfc3339,
'summary': opportunity.teaser,
'content': opportunity.description,
Expand Down

0 comments on commit 0f52ebe

Please sign in to comment.