Skip to content

Commit

Permalink
[chores] Minor formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier committed Dec 2, 2020
1 parent 6754ac9 commit fcfa337
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion openwisp_controller/config/base/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class AbstractConfig(BaseConfig):
verbose_name=_('templates'),
base_class=TemplatesThrough,
blank=True,
help_text=_('configuration templates, applied from ' 'first to last'),
help_text=_('configuration templates, applied from first to last'),
)
vpn = models.ManyToManyField(
get_model_name('config', 'Vpn'),
Expand Down
2 changes: 1 addition & 1 deletion openwisp_controller/config/base/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class AbstractDevice(OrgMixin, BaseModel):
blank=True,
null=True,
db_index=True,
help_text=_('ip address of the management interface, ' 'if available'),
help_text=_('ip address of the management interface, if available'),
)
hardware_id = models.CharField(**(app_settings.HARDWARE_ID_OPTIONS))

Expand Down
2 changes: 1 addition & 1 deletion openwisp_controller/config/base/multitenancy.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class AbstractOrganizationConfigSettings(UUIDModel):
registration_enabled = models.BooleanField(
_('auto-registration enabled'),
default=True,
help_text=_('Whether automatic registration of ' 'devices is enabled or not'),
help_text=_('Whether automatic registration of devices is enabled or not'),
)
shared_secret = KeyField(
max_length=32,
Expand Down
4 changes: 2 additions & 2 deletions openwisp_controller/config/base/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ class AbstractTemplate(ShareableOrgMixin, BaseConfig):
choices=TYPE_CHOICES,
default='generic',
db_index=True,
help_text=_('template type, determines which ' 'features are available'),
help_text=_('template type, determines which features are available'),
)
default = models.BooleanField(
_('enabled by default'),
default=False,
db_index=True,
help_text=_(
'whether new configurations will have ' 'this template enabled by default'
'whether new configurations will have this template enabled by default'
),
)
auto_cert = models.BooleanField(
Expand Down
4 changes: 2 additions & 2 deletions openwisp_controller/config/controller/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@ def post(self, request, *args, **kwargs):
# ("running" was changed to "applied")
status = status if status != 'running' else 'applied'
# call set_status_{status} method on Config model
method_name = 'set_status_{}'.format(status)
method_name = f'set_status_{status}'
getattr(config, method_name)()
return ControllerResponse(
'report-result: success\n' 'current-status: {}\n'.format(config.status),
f'report-result: success\ncurrent-status: {config.status}\n',
content_type='text/plain',
)

Expand Down
2 changes: 1 addition & 1 deletion openwisp_controller/config/tests/test_vpn.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def test_vpn_cert_and_ca_mismatch(self):
except ValidationError as e:
self.assertIn('cert', e.message_dict)
else:
self.fail('Mismatch between ca and cert but ' 'ValidationError not raised')
self.fail('Mismatch between ca and cert but ValidationError not raised')

def test_auto_client(self):
vpn = self._create_vpn()
Expand Down

0 comments on commit fcfa337

Please sign in to comment.