Skip to content

Commit 0d162bd

Browse files
authored
fix(scriptor): persist cookie on login by using setdefault instead of… (#226)
The dictionary in the credential-file was missing the key "cookie" on initial `viur script setup`. Use `.setdefault` instead `.get` to make sure that key "cookie" will be created if it doesn't exist.
1 parent 21ebcac commit 0d162bd

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/viur_cli/scriptor/login.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def ensure_login(
4949

5050
cookie_str: str = callback_app.cookie.get()
5151
key, value = cookie_str.split(";", 1)[0].split("=")
52-
scriptor_config.get("cookies",{})[key] = value
52+
scriptor_config.setdefault("cookies", {})[key] = value
5353
scriptor_config.save()
5454

5555
return True

src/viur_cli/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
__version__ = "2.3.6"
1+
__version__ = "2.3.9"
22
MINIMAL_PIPENV = "2023.11.15"

0 commit comments

Comments
 (0)