Skip to content

Commit

Permalink
Dubbele bestandsnamen oplossen
Browse files Browse the repository at this point in the history
  • Loading branch information
LGDTimtou committed May 23, 2024
1 parent da0a5e6 commit 58a53b4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions api/models/indiening.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,12 @@ def save(self, *args, **kwargs):
)
default_storage.save(new_path, ContentFile(old_file.read()))
self.bestand.name = new_path
super(Indiening, self).save(*args, **kwargs)
old_file.storage.delete(old_file.name)
else:
super(Indiening, self).save(*args, **kwargs)

super(Indiening, self).save(*args, **kwargs)



def run_tests_async(instance):
"""
Voert tests uit op een asynchrone manier en werkt de status en het resultaat van de indiening bij.
Expand Down

0 comments on commit 58a53b4

Please sign in to comment.