Skip to content

Error when proofing article that has no pub date #4984

@joemull

Description

@joemull

Problem

The date_human template filter raises an error when the value passed to it is null, which can happen with nullable date fields like date_published. I discovered this when previewing an article that had not been published.

Proposed solution

Add a check at the beginning of the function for the value being falsy, and return an empty string.

Janeway version

master / Janeway 1.9

Metadata

Metadata

Assignees

Labels

bugSomething's not working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions