Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v2.0.10 #1346

Merged
merged 8 commits into from
Jul 14, 2017
4 changes: 3 additions & 1 deletion netbox/dcim/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,9 @@ class DeviceTypeBulkEditForm(BootstrapMixin, CustomFieldBulkEditForm):
u_height = forms.IntegerField(min_value=1, required=False)
is_full_depth = forms.NullBooleanField(required=False, widget=BulkEditNullBooleanSelect, label='Is full depth')
interface_ordering = forms.ChoiceField(choices=add_blank_choice(IFACE_ORDERING_CHOICES), required=False)
is_console_server = forms.NullBooleanField(required=False, widget=BulkEditNullBooleanSelect, label='Is full depth')
is_console_server = forms.NullBooleanField(
required=False, widget=BulkEditNullBooleanSelect, label='Is a console server'
)
is_pdu = forms.NullBooleanField(required=False, widget=BulkEditNullBooleanSelect, label='Is a PDU')
is_network_device = forms.NullBooleanField(
required=False, widget=BulkEditNullBooleanSelect, label='Is a network device'
Expand Down
2 changes: 1 addition & 1 deletion netbox/ipam/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ class PrefixCSVForm(forms.ModelForm):
required=False
)
status = CSVChoiceField(
choices=IPADDRESS_STATUS_CHOICES,
choices=PREFIX_STATUS_CHOICES,
help_text='Operational status'
)
role = forms.ModelChoiceField(
Expand Down
2 changes: 1 addition & 1 deletion netbox/netbox/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
)


VERSION = '2.0.9'
VERSION = '2.0.10'

# Import required configuration parameters
ALLOWED_HOSTS = DATABASE = SECRET_KEY = None
Expand Down
10 changes: 6 additions & 4 deletions netbox/secrets/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,15 @@ def activate_selected(modeladmin, request, queryset):
if 'activate' in request.POST:
form = ActivateUserKeyForm(request.POST)
if form.is_valid():
try:
master_key = my_userkey.get_master_key(form.cleaned_data['secret_key'])
master_key = my_userkey.get_master_key(form.cleaned_data['secret_key'])
if master_key is not None:
for uk in form.cleaned_data['_selected_action']:
uk.activate(master_key)
return redirect('admin:secrets_userkey_changelist')
except ValueError:
messages.error(request, "Invalid private key provided. Unable to retrieve master key.")
else:
messages.error(
request, "Invalid private key provided. Unable to retrieve master key.", extra_tags='error'
)
else:
form = ActivateUserKeyForm(initial={'_selected_action': request.POST.getlist(admin.ACTION_CHECKBOX_NAME)})

Expand Down
2 changes: 1 addition & 1 deletion netbox/secrets/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class SecretRoleForm(BootstrapMixin, forms.ModelForm):

class Meta:
model = SecretRole
fields = ['name', 'slug']
fields = ['name', 'slug', 'users', 'groups']


#
Expand Down
2 changes: 1 addition & 1 deletion netbox/utilities/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def get(self, request):
# Construct the table based on the user's permissions
table = self.table(self.queryset)
if 'pk' in table.base_columns and (permissions['change'] or permissions['delete']):
table.base_columns['pk'].visible = True
table.columns.show('pk')

# Apply the request context
paginate = {
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ django-debug-toolbar>=1.7
django-filter>=1.0.2
django-mptt==0.8.7
django-rest-swagger>=2.1.0
django-tables2>=1.6.0
django-tables2>=1.7.0
djangorestframework>=3.6.2
graphviz>=0.6
Markdown>=2.6.7
Expand Down