Skip to content

Commit 00de0f8

Browse files
committed
Refactor init of Organization
1 parent 10b3dc4 commit 00de0f8

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

  • membersuite_api_client/organizations

membersuite_api_client/organizations/models.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@ class Organization(object):
33
def __init__(self, org):
44
"""Create an Organization model from MemberSuite Organization object
55
"""
6-
self.account_num = org["ID"]
7-
self.id = self.account_num
8-
self.membersuite_id = org["LocalID"]
9-
self.local_id = self.membersuite_id
10-
self.org_name = org["Name"]
11-
self.name = self.org_name
6+
self.id = self.account_num = org["ID"]
7+
self.local_id = self.membersuite_id = org["LocalID"]
8+
self.name = self.org_name = org["Name"]
129
self.picklist_name = org["SortName"] or ''
1310

1411
self.address = org["Mailing_Address"]
@@ -42,6 +39,7 @@ def __init__(self, org_type):
4239
self.id = org_type["ID"]
4340
self.name = org_type["Name"]
4441

42+
4543
STATUSES = {
4644
'6faf90e4-01f3-c54c-f01a-0b3bc87640ab': 'Active',
4745
'6faf90e4-01f3-c0f1-4593-0b3c3ca7ff6c': 'Deceased',

0 commit comments

Comments
 (0)