diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b80b49a8..07404263 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,12 +43,15 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + cache: 'pip' + cache-dependency-path: | + **/requirements*.txt - name: Install Dependencies id: deps run: | - sudo apt update - sudo apt-get -qq -y install sqlite3 gdal-bin + sudo apt -qq update + sudo apt -qq -y install sqlite3 gdal-bin pip install -U pip wheel setuptools pip install -U -r requirements-test.txt pip install -U -e . diff --git a/openwisp_notifications/base/forms.py b/openwisp_notifications/base/forms.py index 4b1b91f5..b2bc6add 100644 --- a/openwisp_notifications/base/forms.py +++ b/openwisp_notifications/base/forms.py @@ -9,9 +9,11 @@ def __init__(self, *args, **kwargs): if instance: kwargs['initial'] = { 'web': instance.web_notification, - 'email': instance.email_notification - if instance.web_notification - else instance.web_notification, + 'email': ( + instance.email_notification + if instance.web_notification + else instance.web_notification + ), } super().__init__(*args, **kwargs) try: