Skip to content

Commit

Permalink
[ci] CI fixed for testing on django~=3.0.0 openwisp#417
Browse files Browse the repository at this point in the history
  • Loading branch information
codesankalp committed Apr 7, 2021
1 parent 7806457 commit 31044e0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ jobs:
- 3.6
- 3.7
django-version:
- django~=3.0
- django~=3.1
- django~=3.0.0
- django~=3.1.0

steps:
- uses: actions/checkout@v2
Expand Down
5 changes: 4 additions & 1 deletion openwisp_controller/config/sortedm2m/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
SortedCheckboxSelectMultiple as BaseSortedCheckboxSelectMultiple,
)
from sortedm2m.forms import SortedMultipleChoiceField as BaseSortedMultipleChoiceField
from swapper import load_model


class SortedCheckboxSelectMultiple(BaseSortedCheckboxSelectMultiple):
Expand Down Expand Up @@ -75,7 +76,9 @@ def render(
return mark_safe(html)

def modify_checkbox(self, cb, option_label, option_value):
if option_value.instance.required:
Template = load_model('config', 'Template')
template = Template.objects.get(id=str(option_value))
if template.required:
cb.attrs['disabled'] = 'disabled'
cb.attrs['checked'] = 'checked'
option_label = f'{option_label} (required)'
Expand Down
2 changes: 1 addition & 1 deletion tests/openwisp2/sample_users/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Migration(migrations.Migration):
initial = True

dependencies = [
('auth', '0012_alter_user_first_name_max_length'),
('auth', '0011_update_proxy_permissions'),
]

operations = [
Expand Down

0 comments on commit 31044e0

Please sign in to comment.