Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions quart_openapi/pint.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,8 @@ def register(self, app: Pint, first_registration: bool, *, url_prefix: Optional[
"""override the base :meth:`~quart.Blueprint.register` method to add the resources to the app registering
this blueprint, then call the parent register method
"""
if not isinstance(app, Pint):
raise TypeError(f"Please use PintBlueprint with instance of Pint not {type(app)}")
prefix = url_prefix or self.url_prefix or ''
app._resources.extend([(res, f'{prefix}{path}', methods) for res, path, methods in self._resources])
super().register(app, first_registration, url_prefix=url_prefix)
Expand Down