Skip to content

Commit

Permalink
Merge pull request #26 from czachary9538/master
Browse files Browse the repository at this point in the history
adding photo to init.py
  • Loading branch information
czachary9538 authored Mar 29, 2024
2 parents 18374ea + 4421a3e commit 43aa792
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hackathon/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
db = SQLAlchemy(app)
migrate = Migrate(app, db)

from hackathon.models import SignUp, DietaryRestrictions, Race, Orientation, Major
from hackathon.models import SignUp, DietaryRestrictions, Race, Orientation, Major, Photo

@app.route('/')
def index():
Expand All @@ -28,10 +28,13 @@ def register():
race = Race(form_data, new_signup.id)
orientation = Orientation(form_data, new_signup.id)
major = Major(form_data, new_signup.id)
photo = Photo(form_data, new_signup.id)

db.session.add(dietary)
db.session.add(race)
db.session.add(orientation)
db.session.add(major)
db.session.add(photo)
db.session.commit()
return f'{new_signup.id}', 200
except ValueError as value_err:
Expand Down

0 comments on commit 43aa792

Please sign in to comment.