chore: remove unreachable code (#8465)

This commit is contained in:
Robert Sparks 2025-01-25 15:05:01 -06:00 committed by GitHub
parent ac88f73439
commit 56f723a3bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -744,14 +744,6 @@ def handle_upload_file(file, filename, meeting, subdir, request=None, encoding=N
path = Path(meeting.get_materials_path()) / subdir
path.mkdir(parents=True, exist_ok=True)
# agendas and minutes can only have one file instance so delete file if it already exists
if subdir in ('agenda', 'minutes'):
for f in path.glob(f'{filename.stem}.*'):
try:
f.unlink()
except FileNotFoundError:
pass # if the file is already gone, so be it
with (path / filename).open('wb+') as destination:
# prep file for reading
if hasattr(file, "chunks"):