mirror of
https://github.com/beetbox/beets.git
synced 2026-01-30 12:02:41 +01:00
Fix #1124: avoid crash when deleting fields
This commit is contained in:
parent
fe655e4610
commit
14b150090e
2 changed files with 7 additions and 1 deletions
|
|
@ -1262,7 +1262,10 @@ def modify_items(lib, mods, dels, query, write, move, album, confirm):
|
|||
for obj in objs:
|
||||
obj.update(mods)
|
||||
for field in dels:
|
||||
del obj[field]
|
||||
try:
|
||||
del obj[field]
|
||||
except KeyError:
|
||||
pass
|
||||
if ui.show_model_changes(obj):
|
||||
changed.add(obj)
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,9 @@ Fixed:
|
|||
* We now print a better error message when the database file is corrupted.
|
||||
* :doc:`/plugins/discogs`: Only prompt for authentication when running the
|
||||
:ref:`import-cmd` command. :bug:`1123`
|
||||
* When deleting fields with the :ref:`modify-cmd` command, do not crash when
|
||||
the field cannot be removed (i.e., when it does not exist, when it is a
|
||||
built-in field, or when it is a computed field). :ref:`1124`
|
||||
|
||||
.. _Plex: https://plex.tv/
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue