mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-25 08:46:10 -06:00
fix create cable and add another error #12579
This commit is contained in:
parent
d131d9b310
commit
3c972db277
@ -8,7 +8,7 @@ from django.db.models import Prefetch
|
||||
from django.forms import ModelMultipleChoiceField, MultipleHiddenInput, modelformset_factory
|
||||
from django.http import HttpResponse
|
||||
from django.shortcuts import get_object_or_404, redirect, render
|
||||
from django.urls import reverse
|
||||
from django.urls import reverse, resolve
|
||||
from django.utils.html import escape
|
||||
from django.utils.safestring import mark_safe
|
||||
from django.utils.translation import gettext as _
|
||||
@ -3131,6 +3131,13 @@ class CableEditView(generic.ObjectEditView):
|
||||
|
||||
return obj
|
||||
|
||||
def get_extra_addanother_params(self, request):
|
||||
return {
|
||||
'termination_a_device': resolve(request.GET.get('return_url')).kwargs.get('pk'),
|
||||
'a_terminations_type': request.GET.get('a_terminations_type'),
|
||||
'b_terminations_type': request.GET.get('b_terminations_type')
|
||||
}
|
||||
|
||||
|
||||
@register_model_view(Cable, 'delete')
|
||||
class CableDeleteView(generic.ObjectDeleteView):
|
||||
|
Loading…
Reference in New Issue
Block a user