refactor: Update exception names
This commit is contained in:
parent
f7db085db5
commit
8f7d8bf1ff
2 changed files with 4 additions and 4 deletions
|
|
@ -265,13 +265,13 @@ class InvalidRemoteException(Exception):
|
|||
pass
|
||||
|
||||
|
||||
class LinkExpiredError(ValidationError):
|
||||
class LinkExpired(ValidationError):
|
||||
http_status_code = 410
|
||||
title = "Link Expired"
|
||||
message = "The link has been expired"
|
||||
|
||||
|
||||
class InvalidKey(ValidationError):
|
||||
class InvalidKeyError(ValidationError):
|
||||
http_status_code = 401
|
||||
title = "Invalid Key"
|
||||
message = "The key you are using is invalid"
|
||||
|
|
|
|||
|
|
@ -352,7 +352,7 @@ def validate_key(key, doc):
|
|||
)
|
||||
if document_key_expiry is not None:
|
||||
if is_expired(document_key_expiry[0]):
|
||||
raise frappe.exceptions.LinkExpiredError
|
||||
raise frappe.exceptions.LinkExpired
|
||||
else:
|
||||
return
|
||||
|
||||
|
|
@ -360,7 +360,7 @@ def validate_key(key, doc):
|
|||
if frappe.get_system_settings("allow_older_web_view_links") and key == doc.get_signature():
|
||||
return
|
||||
|
||||
raise frappe.exceptions.InvalidKey
|
||||
raise frappe.exceptions.InvalidKeyError
|
||||
|
||||
|
||||
def get_letter_head(doc, no_letterhead, letterhead=None):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue