Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ansibleguy committed Jan 17, 2024
1 parent 1592dfd commit ad2491a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,12 @@ jobs:
run: |
m1=$(python3 manage.py makemigrations 2>&1)
if echo "$m1" | grep -q 'WARNING'; then exit 1;fi
m2=$(python3 manage.py migrate 2>&1)
if echo "$m2" | grep -q 'WARNING'; then exit 1;fi
m3=$(python3 manage.py migrate aw 2>&1)
if echo "$m3" | grep -q 'WARNING'; then exit 1;fi
shell: bash
working-directory: src/ansible-webui/

Expand Down
2 changes: 1 addition & 1 deletion scripts/run_shared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export DJANGO_SUPERUSER_EMAIL='ansible@localhost'
if [[ "$TEST_QUIET" != "1" ]]
then
log 'INSTALLING REQUIREMENTS'
python3 -m pip install --upgrade -r ../requirements.txt >/dev/null
python3 -m pip install --upgrade -r ./requirements.txt >/dev/null
fi

log 'SETTING VERSION'
Expand Down
4 changes: 2 additions & 2 deletions src/ansible-webui/aw/model/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ class JobExecutionResultHost(BareModel):
result = models.ForeignKey(JobExecutionResult, on_delete=models.CASCADE, related_name='jobresulthost_fk_result')

def __str__(self) -> str:
result = 'succeeded'

if int(self.tasks_failed) > 0:
result = 'failed'
else:
result = 'success' if self.warning is None else 'warning'

return f"Job execution {self.created} of host {self.hostname}: {result}"

Expand Down

0 comments on commit ad2491a

Please sign in to comment.