Skip to content

Commit

Permalink
Merge pull request #1580 from UlrichB22/import_subs
Browse files Browse the repository at this point in the history
import19: fix subscription migration rules
  • Loading branch information
RogerHaase authored Jan 13, 2024
2 parents 625c369 + bda139a commit fd21813
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/moin/cli/migration/moin19/import19.py
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,10 @@ def migrate_subscriptions(self, subscribed_items):
if ":" in subscribed_item:
wikiname, subscribed_item = subscribed_item.split(":", 1)

if (subscribed_item.endswith(".*") and len(subscribed_item) > 2
if not any(x in subscribed_item for x in RECHARS):
subscriptions.append("{0}:{1}:{2}".format(NAME, wikiname, subscribed_item))
elif (subscribed_item.endswith(".*") and len(subscribed_item) > 2
and not subscribed_item.endswith("/.*")
and not any(x in subscribed_item[:-2] for x in RECHARS)):
subscriptions.append("{0}:{1}:{2}".format(NAMEPREFIX, wikiname, subscribed_item[:-2]))
else:
Expand Down

0 comments on commit fd21813

Please sign in to comment.