Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/action@v3.0.0
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
- uses: pre-commit/action@v3.0.1

build:
runs-on: ubuntu-latest
Expand All @@ -40,13 +40,13 @@ jobs:


steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v8.0.0

- name: "Set up Python"
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version-file: ".python-version"

Expand Down
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
repos:
- repo: https://github.com/psf/black
rev: 25.12.0
rev: 26.3.1
hooks:
- id: black

- repo: https://github.com/pycqa/isort
rev: 7.0.0
rev: 8.0.1
hooks:
- id: isort

Expand All @@ -23,26 +23,26 @@ repos:
args: [ "--py313-plus" ]

- repo: https://github.com/rtts/djhtml
rev: '3.0.10'
rev: '3.0.11'
hooks:
- id: djhtml
- id: djcss
- id: djjs

- repo: https://github.com/adamchainz/django-upgrade
rev: 1.29.1
rev: 1.30.0
hooks:
- id: django-upgrade
args: [ --target-version, "6.0" ]

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.14.10'
rev: 'v0.15.8'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]

- repo: https://github.com/adamchainz/djade-pre-commit
rev: '1.7.0'
rev: '1.9.0'
hooks:
- id: djade
args: [--target-version, "5.1"]
6 changes: 2 additions & 4 deletions documents/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,13 +269,11 @@ def cleanup_document_files(instance: Document, **kwargs) -> None:
raise Exception("Documents are read-only.")

pdf_file_name = instance.pdf.name
if pdf_file_name != "" and instance.pdf.storage.exists(pdf_file_name):
if pdf_file_name and instance.pdf.storage.exists(pdf_file_name):
instance.pdf.storage.delete(pdf_file_name)

original_file_name = instance.original.name
if original_file_name != "" and instance.original.storage.exists(
original_file_name
):
if original_file_name and instance.original.storage.exists(original_file_name):
instance.original.storage.delete(original_file_name)


Expand Down
4 changes: 2 additions & 2 deletions documents/templates/documents/document_report.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class="rounded shadow-lg border-0 p-0">
{% include "documents/document_report.html#report_card" %}
</dialog>
{% endpartialdef %}
{% endpartialdef report_modal %}

{% partialdef report_card %}
<div class="card">
Expand Down Expand Up @@ -71,4 +71,4 @@ <h5 class="mb-0">Signaler un problème</h5>
</div>
</form>
</div>
{% endpartialdef %}
{% endpartialdef report_card %}
1 change: 1 addition & 0 deletions manage.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""

import os
import sys

Expand Down
Loading
Loading