rename fhrpgroup to fhrp_group

This commit is contained in:
Renato Almeida de Oliveira Zaroubin 2025-03-21 19:26:39 +00:00
parent a1f6523bf1
commit b16f60b7f6

View File

@ -327,7 +327,7 @@ class IPAddressImportForm(NetBoxModelImportForm):
to_field_name='name', to_field_name='name',
help_text=_('Assigned interface') help_text=_('Assigned interface')
) )
fhrpgroup = CSVModelChoiceField( fhrp_group = CSVModelChoiceField(
label=_('FHRP Group'), label=_('FHRP Group'),
queryset=FHRPGroup.objects.all(), queryset=FHRPGroup.objects.all(),
required=False, required=False,
@ -348,7 +348,7 @@ class IPAddressImportForm(NetBoxModelImportForm):
class Meta: class Meta:
model = IPAddress model = IPAddress
fields = [ fields = [
'address', 'vrf', 'tenant', 'status', 'role', 'device', 'virtual_machine', 'interface', 'fhrpgroup', 'address', 'vrf', 'tenant', 'status', 'role', 'device', 'virtual_machine', 'interface', 'fhrp_group',
'is_primary', 'is_oob', 'dns_name', 'description', 'comments', 'tags', 'is_primary', 'is_oob', 'dns_name', 'description', 'comments', 'tags',
] ]
@ -405,8 +405,8 @@ class IPAddressImportForm(NetBoxModelImportForm):
# Set interface assignment # Set interface assignment
if self.cleaned_data.get('interface'): if self.cleaned_data.get('interface'):
self.instance.assigned_object = self.cleaned_data['interface'] self.instance.assigned_object = self.cleaned_data['interface']
if self.cleaned_data.get('fhrpgroup'): if self.cleaned_data.get('fhrp_group'):
self.instance.assigned_object = self.cleaned_data['fhrpgroup'] self.instance.assigned_object = self.cleaned_data['fhrp_group']
ipaddress = super().save(*args, **kwargs) ipaddress = super().save(*args, **kwargs)