billing: Enforce license limit for plans on manual license management.

This commit is contained in:
Vishnu KS
2021-05-28 19:27:08 +05:30
committed by Tim Abbott
parent 8c055107d9
commit 1938076f67
12 changed files with 367 additions and 6 deletions

View File

@@ -362,11 +362,16 @@ class ZephyrMessageAlreadySentException(Exception):
class InvitationError(JsonableError):
code = ErrorCode.INVITATION_FAILED
data_fields = ["errors", "sent_invitations"]
data_fields = ["errors", "sent_invitations", "license_limit_reached"]
def __init__(
self, msg: str, errors: List[Tuple[str, str, bool]], sent_invitations: bool
self,
msg: str,
errors: List[Tuple[str, str, bool]],
sent_invitations: bool,
license_limit_reached: bool = False,
) -> None:
self._msg: str = msg
self.errors: List[Tuple[str, str, bool]] = errors
self.sent_invitations: bool = sent_invitations
self.license_limit_reached: bool = license_limit_reached