From 4344cb978b13e6974b934dcc01265a53d116897a Mon Sep 17 00:00:00 2001 From: Tris Forster Date: Wed, 1 Mar 2023 11:25:38 +1100 Subject: [PATCH] Fixed reference to section type --- app/library/views/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/library/views/__init__.py b/app/library/views/__init__.py index 8c36102..7f0895f 100644 --- a/app/library/views/__init__.py +++ b/app/library/views/__init__.py @@ -19,7 +19,7 @@ import re from interface.views import EnsembleMixin, ProjectMixin, AuthorizedResourceMixin from interface.models import Project from library.models import Collection, Work, Document, Section -from library.music_tags import MUSIC_TAGS +from library.music_tags import MUSIC_TAGS, MUSIC_TAG_BY_NAME from library import forms, models from library.pdf_utils import extract_pages, extract_and_concat @@ -332,7 +332,7 @@ class WorkAddDocumentView(CollectionMixin, CreateView): parts.reverse() for word in parts: try: - tag = INSTRUMENT_TAGS[word.lower()] + tag = MUSIC_TAG_BY_NAME[word.lower()] doc.sections.create(tag=tag) break except KeyError: