mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-21 18:38:26 +02:00
Fix photo authorization export
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
@ -14,7 +14,9 @@ class Command(BaseCommand):
|
||||
def handle(self, *args, **kwargs):
|
||||
base_dir = Path(__file__).parent.parent.parent.parent
|
||||
base_dir /= "output"
|
||||
base_dir / "photo_authorizations"
|
||||
if not base_dir.is_dir():
|
||||
base_dir.mkdir()
|
||||
base_dir /= "photo_authorizations"
|
||||
if not base_dir.is_dir():
|
||||
base_dir.mkdir()
|
||||
|
||||
@ -30,6 +32,6 @@ class Command(BaseCommand):
|
||||
file_output.write(file_input.read())
|
||||
|
||||
if participant.photo_authorization_final:
|
||||
with participant.photo_authorization.file as file_input:
|
||||
with participant.photo_authorization_final.file as file_input:
|
||||
with open(team_dir / f"{participant} (finale).pdf", 'wb') as file_output:
|
||||
file_output.write(file_input.read())
|
||||
|
Reference in New Issue
Block a user