~saprativejana/mailman/install_doc

« back to all changes in this revision

Viewing changes to src/mailman/rest/members.py

  • Committer: Barry Warsaw
  • Date: 2015-02-14 01:35:35 UTC
  • Revision ID: barry@list.org-20150214013535-5fbdvnk6tpylvjt6
 * Member resource JSON now include the ``member_id`` as a separate key.

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
        # subscribed to will not have a user id.   The user_id and the
59
59
        # member_id are UUIDs.  We need to use the integer equivalent in the
60
60
        # URL.
 
61
        member_id = member.member_id.int
61
62
        response = dict(
62
63
            list_id=member.list_id,
63
64
            email=member.address.email,
64
65
            role=role,
65
66
            address=path_to('addresses/{}'.format(member.address.email)),
66
 
            self_link=path_to('members/{}'.format(member.member_id.int)),
 
67
            self_link=path_to('members/{}'.format(member_id)),
67
68
            delivery_mode=member.delivery_mode,
 
69
            member_id=member_id,
68
70
            )
69
71
        # Add the user link if there is one.
70
72
        user = member.user