diff --git a/src/calibre/ebooks/metadata/opf2.py b/src/calibre/ebooks/metadata/opf2.py index b12ea4b6c9..08aa439007 100644 --- a/src/calibre/ebooks/metadata/opf2.py +++ b/src/calibre/ebooks/metadata/opf2.py @@ -1276,9 +1276,9 @@ class OPF(object): # {{{ 'isbn', 'tags', 'category', 'comments', 'book_producer', 'pubdate', 'user_categories', 'author_link_map'): val = getattr(mi, attr, None) - is_null = val is None or val in ((), [], (None, None), {}) + is_null = val is None or val in ((), [], (None, None), {}) or (attr == 'rating' and val < 0.1) if is_null: - if apply_null and attr in {'series', 'tags', 'isbn', 'comments', 'publisher'}: + if apply_null and attr in {'series', 'tags', 'isbn', 'comments', 'publisher', 'rating'}: setattr(self, attr, ([] if attr == 'tags' else None)) else: setattr(self, attr, val)