mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Ignore empty string metadata. Fixes #1469.
This commit is contained in:
parent
693ad3296c
commit
55c2fcb2d5
1 changed files with 4 additions and 0 deletions
|
|
@ -460,6 +460,10 @@ class Readers(FileStampDataCacher):
|
|||
self.cache_data(path, (content, reader_metadata))
|
||||
metadata.update(reader_metadata)
|
||||
|
||||
# remove any empty metadata
|
||||
metadata = {key: value for key, value in metadata.items()
|
||||
if value or isinstance(value, (int, bool, float))}
|
||||
|
||||
if content:
|
||||
# find images with empty alt
|
||||
find_empty_alt(content, path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue