Skip to content

Commit

Permalink
[chores] Miscellaneous uppdates
Browse files Browse the repository at this point in the history
  • Loading branch information
pandafy committed Aug 1, 2024
1 parent f9ee37d commit bbeb197
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions openwisp_controller/config/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -749,11 +749,11 @@ def _change_device_status(self, request, queryset, method):
)
self._message_user_device_status(request, error_devices, method, messages.ERROR)

@admin.actions(description=_('Deactivate selected devices'), permissions=['change'])
@admin.action(description=_('Deactivate selected devices'), permissions=['change'])
def deactivate_device(self, request, queryset):
self._change_device_status(request, queryset, 'deactivate')

@admin.actions(description=_('Activate selected devices'), permissions=['change'])
@admin.action(description=_('Activate selected devices'), permissions=['change'])
def activate_device(self, request, queryset):
self._change_device_status(request, queryset, 'activate')

Expand Down
1 change: 0 additions & 1 deletion openwisp_controller/config/tests/test_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2041,7 +2041,6 @@ def test_device_changelist_activate_deactivate_admin_action_security(
class TestTransactionAdmin(
CreateConfigTemplateMixin,
TestAdminMixin,
TestOrganizationMixin,
TransactionTestCase,
):
app_label = 'config'
Expand Down
1 change: 0 additions & 1 deletion openwisp_controller/config/tests/test_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,6 @@ def test_create_default_config_existing(self):

class TestTransactionDevice(
CreateConfigTemplateMixin,
TestOrganizationMixin,
AssertNumQueriesSubTestMixin,
CreateDeviceGroupMixin,
TransactionTestCase,
Expand Down
2 changes: 1 addition & 1 deletion openwisp_controller/connection/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def has_change_permission(self, request, obj):
return False


class CommandWritableInline(admin.StackedInline):
class CommandWritableInline(DeactivatedDeviceReadOnlyMixin, admin.StackedInline):
model = Command
extra = 1
form = CommandForm
Expand Down

0 comments on commit bbeb197

Please sign in to comment.