Skip to content

Commit 063d1f1

Browse files
Update service.py (#6348)
1 parent 1faaf4f commit 063d1f1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

server/polar/license_key/service.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,12 @@ async def activate(
224224
license_key: LicenseKey,
225225
activate: LicenseKeyActivate,
226226
) -> LicenseKeyActivation:
227+
if not license_key.is_active():
228+
raise NotPermitted(
229+
"License key is no longer active. "
230+
"This license key can not be activated."
231+
)
232+
227233
if not license_key.limit_activations:
228234
raise NotPermitted(
229235
"This license key does not support activations. "

0 commit comments

Comments
 (0)