Skip to content

Commit

Permalink
Fix convert_to_indexable for items in a namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
UlrichB22 committed Sep 18, 2024
1 parent 07ee456 commit c34ed4f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/moin/storage/middleware/indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,11 @@ def convert_to_indexable(meta, data, item_name=None, is_new=False):
metadata as a side effect
:returns: indexable content, text/plain, unicode object
"""
if not item_name:
if not item_name or (item_name and meta.get(NAMESPACE)):
try:
item_name = meta[NAMESPACE] + "/" + meta[NAME][0]
except IndexError:
item_name = meta[NAMESPACE] + "/" + "DoesNotExist"
elif item_name and meta.get(NAMESPACE):
item_name = meta[NAMESPACE] + "/" + meta[NAME][0]
fqname = split_fqname(item_name)

class PseudoRev:
Expand Down

0 comments on commit c34ed4f

Please sign in to comment.