We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7097058 commit b9e5f98Copy full SHA for b9e5f98
src/flask_muck/commands.py
@@ -11,7 +11,7 @@
11
@with_appcontext
12
def openapi_spec() -> None:
13
"""Print OpenAPI spec JSON for this app's API."""
14
- muck = current_app.extensions.get("muck")
15
- if muck is None:
+ if (muck := current_app.extensions.get("muck")) is None:
16
print("No Flask-Muck extension initialized in this app")
+ return
17
print_json(json.dumps(muck.spec.to_dict(), indent=2))
0 commit comments