Skip to content

Commit

Permalink
Merge pull request #1764 from UlrichB22/del_idx_namespace
Browse files Browse the repository at this point in the history
Fix convert_to_indexable for items in a namespace
  • Loading branch information
RogerHaase authored Sep 20, 2024
2 parents 07ee456 + c34ed4f commit 9c355e1
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 9c355e1

Please sign in to comment.