Skip to content

Commit 55839b5

Browse files
committed
fix: add missing method
1 parent e7699ba commit 55839b5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

membersuite_api_client/security/services.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
from django.contrib.auth.models import User
44

5-
from .models import PortalUser, generate_username
5+
from .models import Individual, PortalUser, generate_username
66
from ..exceptions import LoginToPortalError, LogoutError
77
from ..mixins import ChunkQueryMixin
8-
from ..utils import get_session_id
8+
from ..utils import get_session_id, convert_ms_object
99

1010

1111
def login_to_portal(username, password, client, retries=2, delay=0):
@@ -148,3 +148,9 @@ def get_all_users(self, limit_to=100, max_calls=None, parameters=None,
148148
start_record=start_record, verbose=verbose)
149149

150150
return user_list or []
151+
152+
def ms_object_to_model(self, ms_obj):
153+
" Converts an individual result to a Subscription Model "
154+
sane_obj = convert_ms_object(
155+
ms_obj['Fields']['KeyValueOfstringanyType'])
156+
return Individual(sane_obj)

0 commit comments

Comments
 (0)