mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 17:26:21 +00:00
si el post ya tiene fecha, no cambiarla
This commit is contained in:
parent
f5834b5c1b
commit
64b59bfc4d
1 changed files with 3 additions and 1 deletions
|
@ -8,6 +8,8 @@ class MetadataDocumentDate < MetadataTemplate
|
||||||
end
|
end
|
||||||
|
|
||||||
def value_from_document
|
def value_from_document
|
||||||
|
return nil unless document.path
|
||||||
|
|
||||||
document.date
|
document.date
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -42,7 +44,7 @@ class MetadataDocumentDate < MetadataTemplate
|
||||||
value_from_document || default_value
|
value_from_document || default_value
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
value_from_document || default_value
|
self[:value] || value_from_document || default_value
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue