From 16a6499c72d041bb6b10f3c6f03b64f71f5024ac Mon Sep 17 00:00:00 2001 From: SimplifiedPrivacy Date: Sun, 8 Nov 2026 10:20:54 -0500 Subject: [PATCH] Enum mismatch on expired invoices being shown the correct error prompts on ticket setup --- core/models/Result.py | 1 + core/models/manage/server_reply_tools.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/models/Result.py b/core/models/Result.py index efb5cdd..37f3c8e 100644 --- a/core/models/Result.py +++ b/core/models/Result.py @@ -39,6 +39,7 @@ class ResultError(Enum): TICKET_SETUP = "ticket_setup" TICKET_EXPIRED = "ticket_expired" ALREADY_EXISTS = "already_exists" + ALREADY_USED = "already_used" BILLING_CODE_EXISTS = "billing_code_exists" PROCESS_GOT_KILLED = "process_got_killed" PROCESS_WONT_START = "process_wont_start" diff --git a/core/models/manage/server_reply_tools.py b/core/models/manage/server_reply_tools.py index c0ac048..1b2b7b6 100644 --- a/core/models/manage/server_reply_tools.py +++ b/core/models/manage/server_reply_tools.py @@ -22,7 +22,8 @@ TRANSLATION_DICT = { ServerError.MISSING_DATA: ResultError.INVALID_INPUT, ServerError.UNPAID: ResultError.SUBSCRIPTION, ServerError.SERVER_SIDE: ResultError.SERVER_SIDE, - ServerError.EXPIRED: ResultError.EXPIRED_INVOICE + ServerError.EXPIRED: ResultError.EXPIRED_INVOICE, + ServerError.ALREADY_USED: ResultError.ALREADY_EXISTS } def format_server_response(api_response: ApiResponse|dict, desired_type: str) -> Result: