mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Fix #7459: Bug/error when copying and deleting from one library to another. Problem arose because field_metadata modified a class_level (static) attribute.
This commit is contained in:
parent
6d07dc5850
commit
a5cadce603
@ -3,6 +3,7 @@ Created on 25 May 2010
|
||||
|
||||
@author: charles
|
||||
'''
|
||||
import copy
|
||||
|
||||
from calibre.utils.ordered_dict import OrderedDict
|
||||
from calibre.utils.config import tweaks
|
||||
@ -86,7 +87,7 @@ class FieldMetadata(dict):
|
||||
|
||||
# Builtin metadata {{{
|
||||
|
||||
_field_metadata = [
|
||||
_field_metadata_prototype = [
|
||||
('authors', {'table':'authors',
|
||||
'column':'name',
|
||||
'link_column':'author',
|
||||
@ -322,6 +323,7 @@ class FieldMetadata(dict):
|
||||
]
|
||||
|
||||
def __init__(self):
|
||||
self._field_metadata = copy.deepcopy(self._field_metadata_prototype)
|
||||
self._tb_cats = OrderedDict()
|
||||
self._search_term_map = {}
|
||||
self.custom_label_to_key_map = {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user