diff --git a/apps/orgs/serializers.py b/apps/orgs/serializers.py index 2a732a03f..36c529882 100644 --- a/apps/orgs/serializers.py +++ b/apps/orgs/serializers.py @@ -26,12 +26,12 @@ class OrgSerializer(ModelSerializer): read_only_fields = ['created_by', 'date_created'] def create(self, validated_data): - members = self._pop_memebers(validated_data) + members = self._pop_members(validated_data) instance = Organization.objects.create(**validated_data) OrganizationMember.objects.add_users_by_role(instance, *members) return instance - def _pop_memebers(self, validated_data): + def _pop_members(self, validated_data): return ( validated_data.pop('users', None), validated_data.pop('admins', None), @@ -39,7 +39,7 @@ class OrgSerializer(ModelSerializer): ) def update(self, instance, validated_data): - members = self._pop_memebers(validated_data) + members = self._pop_members(validated_data) for attr, value in validated_data.items(): setattr(instance, attr, value) instance.save() diff --git a/apps/orgs/urls/api_urls.py b/apps/orgs/urls/api_urls.py index cf72d4119..93192ef2a 100644 --- a/apps/orgs/urls/api_urls.py +++ b/apps/orgs/urls/api_urls.py @@ -14,7 +14,7 @@ router = DefaultRouter() bulk_router = BulkRouter() router.register(r'orgs', api.OrgViewSet, 'org') -bulk_router.register(r'org-member-relation', api.OrgMemberRelationBulkViewSet, 'org-memeber-relation') +bulk_router.register(r'org-member-relation', api.OrgMemberRelationBulkViewSet, 'org-member-relation') old_version_urlpatterns = [ re_path('(?Porg)/.*', capi.redirect_plural_name_api) diff --git a/apps/tickets/tests.py b/apps/tickets/tests.py index 2b02a9016..ee696d223 100644 --- a/apps/tickets/tests.py +++ b/apps/tickets/tests.py @@ -43,19 +43,19 @@ class TicketTest(APITestCase): ]) new_user = User.objects.create - new_org_memeber = OrganizationMember.objects.create + new_org_member = OrganizationMember.objects.create u = new_user(name='user-01', username='user-01', email='user-01@jms.com') - new_org_memeber(org=org_01, user=u, role=ORG_ROLE.USER) - new_org_memeber(org=org_02, user=u, role=ORG_ROLE.USER) + new_org_member(org=org_01, user=u, role=ORG_ROLE.USER) + new_org_member(org=org_02, user=u, role=ORG_ROLE.USER) self.user_01 = u u = new_user(name='org-admin-01', username='org-admin-01', email='org-admin-01@jms.com') - new_org_memeber(org=org_01, user=u, role=ORG_ROLE.ADMIN) + new_org_member(org=org_01, user=u, role=ORG_ROLE.ADMIN) self.org_admin_01 = u u = new_user(name='org-admin-02', username='org-admin-02', email='org-admin-02@jms.com') - new_org_memeber(org=org_02, user=u, role=ORG_ROLE.ADMIN) + new_org_member(org=org_02, user=u, role=ORG_ROLE.ADMIN) self.org_admin_02 = u def test_create_request_asset_perm(self):