diff --git a/.github/workflows/pytest_action.yml b/.github/workflows/pytest_action.yml index 4771664c..f97e3f05 100644 --- a/.github/workflows/pytest_action.yml +++ b/.github/workflows/pytest_action.yml @@ -16,7 +16,7 @@ jobs: run: | docker-compose -f docker-compose-pipeline.yml build docker-compose -f docker-compose-pipeline.yml up -d - docker-compose -f docker-compose-pipeline.yml exec -T api pytest tests/ --cov --cov-report=xml --cov-fail-under=94 --junit-xml=test-reports/report.xml + docker-compose -f docker-compose-pipeline.yml exec -T api pytest tests/ --cov --cov-report=xml --cov-fail-under=94 --junit-xml=test-reports/report.xml | tee pytest-coverage.txt echo "STATUS=$(cat pytest-coverage.txt | grep 'Required test' | awk '{ print $1 }')" >> $GITHUB_ENV echo "FAILED=$(cat test-reports/report.xml | awk -F'=' '{print $5}' | awk -F' ' '{gsub(/"/, "", $1); print $1}')" >> $GITHUB_ENV env: diff --git a/apps/workspaces/tasks.py b/apps/workspaces/tasks.py index 231c9d4a..3a5c3caf 100644 --- a/apps/workspaces/tasks.py +++ b/apps/workspaces/tasks.py @@ -164,7 +164,7 @@ def run_email_notification(workspace_id): netsuite_subsidiary = SubsidiaryMapping.objects.get(workspace_id=workspace_id).subsidiary_name admin_data = WorkspaceSchedule.objects.get(workspace_id=workspace_id) - if ws_schedule.enabled: + if ws_schedule.enabled and admin_data.emails_selected: for admin_email in admin_data.emails_selected: attribute = ExpenseAttribute.objects.filter(workspace_id=workspace_id, value=admin_email).first()