Skip to content

Commit 0136d12

Browse files
committed
revert back
1 parent a99bc7a commit 0136d12

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

server/mergin/auth/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def __repr__(self):
5252

5353
def check_password(self, password):
5454
# users created through SSO
55-
if not self.passwd:
55+
if self.passwd is None:
5656
return
5757
if isinstance(password, str):
5858
password = password.encode("utf-8")

server/mergin/tests/test_auth.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -950,9 +950,7 @@ def test_login_without_password(client):
950950
login_as_admin(client)
951951
username = "sso_user"
952952
user = add_user(username=username, password="")
953-
user.passwd = None
954-
db.session.commit()
955-
assert user.username == username
953+
assert user.passwd is None
956954
for pwd in ["Il0vemergin", ""]:
957955
resp = client.post(
958956
url_for("/.mergin_auth_controller_login"),

0 commit comments

Comments
 (0)