Fix error when terms of service are missing an effective date (#34200)
This commit is contained in:
parent
547658f086
commit
0099907600
2 changed files with 2 additions and 2 deletions
|
@ -4,7 +4,7 @@ class REST::TermsOfServiceSerializer < ActiveModel::Serializer
|
|||
attributes :effective_date, :effective, :content, :succeeded_by
|
||||
|
||||
def effective_date
|
||||
object.effective_date.iso8601
|
||||
(object.effective_date || object.published_at).iso8601
|
||||
end
|
||||
|
||||
def effective
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue