You can clone with
The Flask.inject_url_defaults() function splits the endpoint at the wrong location to retrieve the name of the blueprint. This causes url_for() not to work properly for blueprints when combined with Blueprint.url_defaults()
endpoint = "catalogue.admin.products.index"
bp = endpoint.split('.', 1)
bp is now 'catalogue' rather than 'catalogue.admin.products'
I presume rsplit() would be more appropriate than split() for this one.