mirror of
https://github.com/beetbox/beets.git
synced 2026-02-21 23:03:26 +01:00
edit: Do not deepcopy objects, finally fixes the regression from #2659
Deepcopying fails if a database is attached as Model._db since the sqlite connection objects it contains are non-copyable
This commit is contained in:
parent
a9a2276774
commit
352d99cccd
1 changed files with 1 additions and 2 deletions
|
|
@ -23,7 +23,6 @@ from beets import ui
|
|||
from beets.dbcore import types
|
||||
from beets.importer import action
|
||||
from beets.ui.commands import _do_query, PromptChoice
|
||||
from copy import deepcopy
|
||||
import codecs
|
||||
import subprocess
|
||||
import yaml
|
||||
|
|
@ -283,7 +282,7 @@ class EditPlugin(plugins.BeetsPlugin):
|
|||
# Show the changes.
|
||||
# If the objects are not on the DB yet, we need a copy of their
|
||||
# original state for show_model_changes.
|
||||
objs_old = [deepcopy(obj) if obj.id < 0 else None
|
||||
objs_old = [obj.copy() if obj.id < 0 else None
|
||||
for obj in objs]
|
||||
self.apply_data(objs, old_data, new_data)
|
||||
changed = False
|
||||
|
|
|
|||
Loading…
Reference in a new issue