Skip to content

Commit 6a7431d

Browse files
committed
nit update to invitelimit
1 parent 6634f82 commit 6a7431d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

labelbox/schema/organization.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from labelbox import utils
55
from labelbox.orm.db_object import DbObject, query, Entity
66
from labelbox.orm.model import Field, Relationship
7+
from labelbox.schema.invite import InviteLimit
78

89
if TYPE_CHECKING:
910
from labelbox import Role, User, ProjectRole, Invite, InviteLimit, IAMIntegration
@@ -94,7 +95,7 @@ def invite_user(
9495
raise LabelboxError(f"Unable to send invite for email {email}")
9596
return Entity.Invite(self.client, invite_response)
9697

97-
def invite_limit(self) -> "InviteLimit":
98+
def invite_limit(self) -> InviteLimit:
9899
""" Retrieve invite limits for the org
99100
This already accounts for users currently in the org
100101
Meaining that `used = users + invites, remaining = limit - (users + invites)`
@@ -108,7 +109,7 @@ def invite_limit(self) -> "InviteLimit":
108109
"""query InvitesLimitPyApi($%s: ID!) {
109110
invitesLimit(where: {id: $%s}) { used limit remaining }
110111
}""" % (org_id_param, org_id_param), {org_id_param: self.uid})
111-
return Entity.InviteLimit(
112+
return InviteLimit(
112113
**{utils.snake_case(k): v for k, v in res['invitesLimit'].items()})
113114

114115
def remove_user(self, user: "User") -> None:

0 commit comments

Comments
 (0)