Skip to content

Commit c5e09cb

Browse files
Prevent empty JSON body from causing None error in git config endpoint (#959)
* Prevent empty JSON body from causing None error in git config endpoint * Apply suggestions from code review Co-authored-by: Frédéric Collonval <fcollonval@gmail.com>
1 parent ceab42b commit c5e09cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jupyterlab_git/handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ async def post(self, path: str = ""):
646646
"""
647647
POST get (if no options are passed) or set configuration options
648648
"""
649-
data = self.get_json_body()
649+
data = self.get_json_body() or {}
650650
options = data.get("options", {})
651651

652652
filtered_options = {k: v for k, v in options.items() if k in ALLOWED_OPTIONS}

0 commit comments

Comments
 (0)