Fixed reference to section type
This commit is contained in:
parent
a3d8cf0a21
commit
4344cb978b
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user