Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use display entry when main entry is absent
  • Loading branch information
kthoden committed Sep 2, 2020
1 parent 8346d7c commit 978cebb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/imxml2django.py
Expand Up @@ -878,6 +878,9 @@ def make_index(index_hits, index_type):
for xmlEOAindex in index_hits:
strMainEntry = xmlEOAindex.get("main")
str_display_entry = xmlEOAindex.get("display")
if len(strMainEntry) == 0:
strMainEntry = str_display_entry
logging.warning("Index found without main entry, only display string. Using display string for sorting.")

# If strMainEntry not in Index, then create new index element
if strMainEntry not in dictIndex:
Expand Down

0 comments on commit 978cebb

Please sign in to comment.