mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-17 22:36:22 +00:00
Merge branch 'vali-date' into staging
This commit is contained in:
commit
d6c41d468b
1 changed files with 3 additions and 1 deletions
|
@ -8,6 +8,8 @@ class MetadataDocumentDate < MetadataTemplate
|
|||
end
|
||||
|
||||
def value_from_document
|
||||
return nil unless document.path
|
||||
|
||||
document.date
|
||||
end
|
||||
|
||||
|
@ -46,7 +48,7 @@ class MetadataDocumentDate < MetadataTemplate
|
|||
value_from_document || default_value
|
||||
end
|
||||
else
|
||||
value_from_document || default_value
|
||||
self[:value] || value_from_document || default_value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue