Skip to content

Commit ed83176

Browse files
David AlvesDavid Alves
authored andcommitted
Handle activation limit failures
1 parent 2fcc80e commit ed83176

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/licence.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ def activate(key):
102102
db.set_setting("licence_key", key)
103103
return {"valid": True, "error": None}
104104
elif resp.status_code == 409:
105-
db.set_setting("licence_key", key)
106-
return {"valid": True, "error": None}
105+
msg = data.get("error") or "Activation limit reached for this licence."
106+
return {"valid": False, "error": msg}
107107
else:
108108
msg = data.get("error") or "Invalid license key."
109109
return {"valid": False, "error": msg}

0 commit comments

Comments
 (0)