Ramsey99 / fest-registration

This is a registration website for a college fest using HTML, CSS, Python Flask, mySQL databse.
https://fest-registration.vercel.app
22 stars 84 forks source link

Handle Missing File Uploads in /submit Route (app.py) #97

Open DevROHIT11 opened 2 weeks ago

DevROHIT11 commented 2 weeks ago

Description: The filename variable is only defined if a file is uploaded, which can lead to an UnboundLocalError when the add_registration procedure is called without an uploaded file.

Suggested Fix:

  1. Initialize filename to None at the start of the file upload logic.
  2. Update the stored procedure to handle NULL values for filename or provide a default value.
github-actions[bot] commented 2 weeks ago

👋 Thank you for raising an issue! We appreciate your effort in helping us improve. Our Fest Registration team will review it shortly. Stay tuned!