Skip to content

Commit

Permalink
Apply suggestions from pull request thread
Browse files Browse the repository at this point in the history
Co-authored-by: Morten Brekkevold <[email protected]>
  • Loading branch information
jorund1 and lunkwill42 authored Aug 23, 2024
1 parent b843585 commit 6251877
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions python/nav/web/seeddb/page/netbox/edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,7 @@ def netbox_do_save(form):
func.value = function
func.save()
elif function == '':
try:
func = NetboxInfo.objects.get(netbox=netbox, variable='function')
except NetboxInfo.DoesNotExist:
pass
else:
func.delete()
NetboxInfo.objects.filter(netbox=netbox, variable='function').delete()

# Save the groups
netboxgroups = form.cleaned_data['groups']
Expand Down

0 comments on commit 6251877

Please sign in to comment.