mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-07 16:18:16 -06:00
cleanup
This commit is contained in:
parent
8f72287198
commit
916cb712d1
@ -379,7 +379,7 @@ class RackReservationForm(BootstrapMixin, TenancyForm, forms.ModelForm):
|
||||
|
||||
class Meta:
|
||||
model = RackReservation
|
||||
fields = ['units', 'description', 'tenant_group', 'tenant']
|
||||
fields = ['units', 'tenant_group', 'tenant', 'description']
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
||||
@ -410,7 +410,7 @@ class RackReservationFilterForm(BootstrapMixin, forms.Form):
|
||||
null_option=(0, 'None')
|
||||
)
|
||||
tenant = FilterChoiceField(
|
||||
queryset=Tenant.objects.annotate(filter_count=Count('racks')),
|
||||
queryset=Tenant.objects.annotate(filter_count=Count('racks__reservations')),
|
||||
to_field_name='slug',
|
||||
null_option=(0, 'None')
|
||||
)
|
||||
|
@ -245,8 +245,6 @@ class RackImportTable(BaseTable):
|
||||
|
||||
class RackReservationTable(BaseTable):
|
||||
pk = ToggleColumn()
|
||||
site = tables.LinkColumn('dcim:site', args=[Accessor('site.slug')])
|
||||
group = tables.Column(accessor=Accessor('group.name'), verbose_name='Group')
|
||||
tenant = tables.LinkColumn('tenancy:tenant', args=[Accessor('tenant.slug')])
|
||||
rack = tables.LinkColumn('dcim:rack', args=[Accessor('rack.pk')])
|
||||
unit_list = tables.Column(orderable=False, verbose_name='Units')
|
||||
|
Loading…
Reference in New Issue
Block a user