Skip to content

Commit

Permalink
Merge pull request #322 from SELab-2/backend_extras
Browse files Browse the repository at this point in the history
Dubbele bestandsnamen oplossen
  • Loading branch information
LGDTimtou authored May 23, 2024
2 parents 78c0dcb + 58a53b4 commit 8ff89a7
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 8ff89a7

Please sign in to comment.