@ -105,7 +105,6 @@ class Entity(
|
||||
):
|
||||
|
||||
return related_object.name
|
||||
break
|
||||
|
||||
|
||||
return ''
|
||||
|
@ -255,7 +255,6 @@ class AssetBase(
|
||||
):
|
||||
|
||||
return related_object.name
|
||||
break
|
||||
|
||||
|
||||
return ''
|
||||
|
@ -1529,12 +1529,6 @@ class RelatedTickets(TenancyObject):
|
||||
return FeatureNotUsed
|
||||
|
||||
|
||||
def __str__(self):
|
||||
|
||||
# return '#' + str( self.id )
|
||||
|
||||
return '#'
|
||||
|
||||
|
||||
@property
|
||||
def parent_object(self):
|
||||
|
@ -780,7 +780,6 @@ class TicketBase(
|
||||
):
|
||||
|
||||
return related_object.name
|
||||
break
|
||||
|
||||
|
||||
return ''
|
||||
|
@ -335,7 +335,6 @@ class TicketCommentBase(
|
||||
):
|
||||
|
||||
return related_object.name
|
||||
break
|
||||
|
||||
|
||||
return ''
|
||||
|
@ -232,11 +232,10 @@ class TicketModelSerializer(
|
||||
if self.instance.project is None:
|
||||
|
||||
raise centurion_exception.ValidationError(
|
||||
details = 'Milestones require a project',
|
||||
detail = 'Milestones require a project',
|
||||
code = 'milestone_requires_project',
|
||||
)
|
||||
|
||||
return False
|
||||
|
||||
if self.instance.project.id == self.instance.milestone.project.id:
|
||||
|
||||
|
@ -448,5 +448,3 @@ def process_inventory(self, data, organization: int):
|
||||
logger.critical('Exception')
|
||||
|
||||
raise Exception(e)
|
||||
|
||||
return str(f'Exception Occured: {e}')
|
||||
|
@ -1,5 +1,6 @@
|
||||
from drf_spectacular.utils import extend_schema, extend_schema_view, OpenApiResponse
|
||||
|
||||
from access.models.tenant import Tenant
|
||||
from api.viewsets.common import ModelViewSet
|
||||
|
||||
# This import only exists so that the migrations can be created
|
||||
@ -9,7 +10,6 @@ from project_management.serializers.project import ( # pylint: disable=W0611:
|
||||
ProjectImportSerializer,
|
||||
ProjectModelSerializer,
|
||||
ProjectViewSerializer,
|
||||
Organization,
|
||||
)
|
||||
|
||||
|
||||
@ -86,7 +86,7 @@ class ViewSet( ModelViewSet ):
|
||||
|
||||
organization = int(self.request.data['organization'])
|
||||
|
||||
organization = Organization.objects.get( pk = organization )
|
||||
organization = Tenant.objects.get( pk = organization )
|
||||
|
||||
elif self.queryset:
|
||||
|
||||
|
Reference in New Issue
Block a user