From aaf7ed6a25bcdf9bfcd76029652cf332cdab45b4 Mon Sep 17 00:00:00 2001 From: Charles Haley Date: Wed, 31 Mar 2021 22:03:15 +0100 Subject: [PATCH] Bug #1922131: Advanced rules editor fails after new library with structure --- src/calibre/gui2/dialogs/template_dialog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/dialogs/template_dialog.py b/src/calibre/gui2/dialogs/template_dialog.py index b2323c63c2..fa1bdf92fe 100644 --- a/src/calibre/gui2/dialogs/template_dialog.py +++ b/src/calibre/gui2/dialogs/template_dialog.py @@ -318,7 +318,7 @@ class TemplateDialog(QDialog, Ui_TemplateDialog): mi.languages = ['eng'] mi.id = 1 if fm is not None: - self.mi.set_all_user_metadata(fm.custom_field_metadata()) + mi.set_all_user_metadata(fm.custom_field_metadata()) else: # No field metadata. Grab a copy from the current library so # that we can validate any custom column names. The values for