14953 update comments
This commit is contained in:
parent
c967b4742e
commit
accdb69e2e
|
@ -32,7 +32,7 @@ class RegionSerializer(NestedGroupModelSerializer):
|
|||
brief_fields = ('id', 'url', 'display', 'name', 'slug', 'description', 'site_count', '_depth')
|
||||
|
||||
def create(self, request, *args, **kwargs):
|
||||
# this is required as tenant_count is added in the view with add_related_count
|
||||
# this is required as site_count is added in the view with add_related_count
|
||||
instance = super().create(request, *args, **kwargs)
|
||||
instance.site_count = 0
|
||||
return instance
|
||||
|
@ -52,7 +52,7 @@ class SiteGroupSerializer(NestedGroupModelSerializer):
|
|||
brief_fields = ('id', 'url', 'display', 'name', 'slug', 'description', 'site_count', '_depth')
|
||||
|
||||
def create(self, request, *args, **kwargs):
|
||||
# this is required as tenant_count is added in the view with add_related_count
|
||||
# this is required as site_count is added in the view with add_related_count
|
||||
instance = super().create(request, *args, **kwargs)
|
||||
instance.site_count = 0
|
||||
return instance
|
||||
|
@ -110,7 +110,7 @@ class LocationSerializer(NestedGroupModelSerializer):
|
|||
brief_fields = ('id', 'url', 'display', 'name', 'slug', 'description', 'rack_count', '_depth')
|
||||
|
||||
def create(self, request, *args, **kwargs):
|
||||
# this is required as tenant_count is added in the view with add_related_count
|
||||
# this is required as rack_count is added in the view with add_related_count
|
||||
instance = super().create(request, *args, **kwargs)
|
||||
instance.rack_count = 0
|
||||
return instance
|
||||
|
|
|
@ -32,7 +32,7 @@ class ContactGroupSerializer(NestedGroupModelSerializer):
|
|||
brief_fields = ('id', 'url', 'display', 'name', 'slug', 'description', 'contact_count', '_depth')
|
||||
|
||||
def create(self, request, *args, **kwargs):
|
||||
# this is required as tenant_count is added in the view with add_related_count
|
||||
# this is required as contact_count is added in the view with add_related_count
|
||||
instance = super().create(request, *args, **kwargs)
|
||||
instance.contact_count = 0
|
||||
return instance
|
||||
|
|
|
@ -28,7 +28,7 @@ class WirelessLANGroupSerializer(NestedGroupModelSerializer):
|
|||
brief_fields = ('id', 'url', 'display', 'name', 'slug', 'description', 'wirelesslan_count', '_depth')
|
||||
|
||||
def create(self, request, *args, **kwargs):
|
||||
# this is required as tenant_count is added in the view with add_related_count
|
||||
# this is required as wirelesslan_count is added in the view with add_related_count
|
||||
instance = super().create(request, *args, **kwargs)
|
||||
instance.wirelesslan_count = 0
|
||||
return instance
|
||||
|
|
Loading…
Reference in New Issue