Skip to content
Open
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
7 changes: 7 additions & 0 deletions backend/routers/issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,13 @@ async def create_issue(
else:
# Don't create new issue, just return deduplication info
new_issue = None

# Clean up uploaded file if it was discarded as duplicate
if image_path and os.path.exists(image_path):
try:
os.remove(image_path)
except OSError:
pass # Ignore cleanup errors
except Exception as e:
# Clean up uploaded file if DB save failed
if image_path and os.path.exists(image_path):
Expand Down
Loading