Skip to content

Commit

Permalink
Merge pull request #996 from alphagov/use-first-published-at
Browse files Browse the repository at this point in the history
Use `first_published_at`
  • Loading branch information
tijmenb authored Jul 30, 2018
2 parents 0e8d7d4 + 5e69415 commit 6c42c7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/presenters/content_item/updatable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def history
end

def first_public_at
content_item["details"]["first_public_at"]
content_item["details"]["first_public_at"] || content_item["first_published_at"]
end

def public_updated_at
Expand Down
2 changes: 1 addition & 1 deletion test/presenters/content_item/updatable_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class << @updatable
def content_item
{
'public_updated_at' => '2002-02-02',
'first_published_at' => '2001-01-01',
'details' => {
'first_public_at' => '2001-01-01',
'change_history' => [
{
'note' => 'note',
Expand Down

0 comments on commit 6c42c7d

Please sign in to comment.