mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-21 12:52:21 -06:00
Fixed bug where placeholder prefixes were being included as 'None' in pk_all for bulk edit/delete
This commit is contained in:
@@ -261,7 +261,7 @@ class BulkEditView(View):
|
||||
redirect_url = reverse(self.default_redirect_url)
|
||||
|
||||
if request.POST.get('_all'):
|
||||
pk_list = request.POST.get('pk_all').split(',')
|
||||
pk_list = [x for x in request.POST.get('pk_all').split(',') if x]
|
||||
else:
|
||||
pk_list = request.POST.getlist('pk')
|
||||
|
||||
@@ -318,7 +318,7 @@ class BulkDeleteView(View):
|
||||
redirect_url = reverse(self.default_redirect_url)
|
||||
|
||||
if request.POST.get('_all'):
|
||||
pk_list = request.POST.get('pk_all').split(',')
|
||||
pk_list = [x for x in request.POST.get('pk_all').split(',') if x]
|
||||
else:
|
||||
pk_list = request.POST.getlist('pk')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user