Skip to content

Commit

Permalink
Minor Tweaks
Browse files Browse the repository at this point in the history
Fixed ID for an org with no membership after someone added a membership to AASHE Test Campus for some reason.

Renamed Name to name in MembershipProduct model.

Removed STARS status field, added extra_data field as a catch all.
  • Loading branch information
baronvonvaderham committed Feb 14, 2017
1 parent 52cb293 commit 101047d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions membersuite_api_client/organizations/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@ def __init__(self, org):

self.org_type = org["Type"]

self.stars_participant_status = (
'STARS participant' if org["STARSCharterParticipant__c"] else ''
)

self.primary_email = org['EmailAddress'] or ''

self.extra_data = org


class OrganizationType(object):

Expand All @@ -39,7 +37,7 @@ def __init__(self, org_type):
from MemberSuite OrganizationType object
"""
self.id = org_type["ID"]
self.Name = org_type["Name"]
self.name = org_type["Name"]

STATUSES = {
'6faf90e4-01f3-c54c-f01a-0b3bc87640ab': 'Active',
Expand Down
2 changes: 1 addition & 1 deletion membersuite_api_client/tests/test_memberships.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_get_membership_for_org(self):
'6faf90e4-0074-cbb5-c1d2-0b3c539859ef')

# Test org without a membership
test_org_id = "6faf90e4-0007-c9dc-98b7-0b3c53985743"
test_org_id = "6faf90e4-0007-c92e-8d16-0b3c53985743"
membership_list = self.service.get_memberships_for_org(test_org_id)
self.assertFalse(membership_list)

Expand Down

0 comments on commit 101047d

Please sign in to comment.