mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-21 19:47:20 -06:00
* fix create cable and add another error #12579 * fix return proper parent object field * improve code and wokflow --------- Co-authored-by: netopsab <abrisson@cerbere.rp.sig.u-bourgogne.fr>
This commit is contained in:
parent
5f0922713f
commit
860be780ad
@ -3131,6 +3131,19 @@ class CableEditView(generic.ObjectEditView):
|
|||||||
|
|
||||||
return obj
|
return obj
|
||||||
|
|
||||||
|
def get_extra_addanother_params(self, request):
|
||||||
|
|
||||||
|
params = {
|
||||||
|
'a_terminations_type': request.GET.get('a_terminations_type'),
|
||||||
|
'b_terminations_type': request.GET.get('b_terminations_type')
|
||||||
|
}
|
||||||
|
|
||||||
|
for key in request.POST:
|
||||||
|
if 'device' in key or 'power_panel' in key or 'circuit' in key:
|
||||||
|
params.update({key: request.POST.get(key)})
|
||||||
|
|
||||||
|
return params
|
||||||
|
|
||||||
|
|
||||||
@register_model_view(Cable, 'delete')
|
@register_model_view(Cable, 'delete')
|
||||||
class CableDeleteView(generic.ObjectDeleteView):
|
class CableDeleteView(generic.ObjectDeleteView):
|
||||||
|
Loading…
Reference in New Issue
Block a user