|
|
@@ -1,4 +1,5 @@
|
|
|
from django.contrib.contenttypes.models import ContentType
|
|
|
+from django.http import QueryDict
|
|
|
from django.shortcuts import get_object_or_404
|
|
|
|
|
|
from circuits.models import Circuit
|
|
|
@@ -365,6 +366,15 @@ class ContactAssignmentEditView(generic.ObjectEditView):
|
|
|
instance.object = get_object_or_404(content_type.model_class(), pk=request.GET.get('object_id'))
|
|
|
return instance
|
|
|
|
|
|
+ def get_extra_addanother_params(self, request, params: dict):
|
|
|
+ if not params:
|
|
|
+ params = QueryDict(mutable=True)
|
|
|
+
|
|
|
+ params['content_type'] = request.GET.get('content_type')
|
|
|
+ params['object_id'] = request.GET.get('object_id')
|
|
|
+
|
|
|
+ return params
|
|
|
+
|
|
|
|
|
|
class ContactAssignmentDeleteView(generic.ObjectDeleteView):
|
|
|
queryset = ContactAssignment.objects.all()
|