[Bugfix] Fix the event creating code

It tried to associate the event with a user instead of a profile.  It is a regression introduced
by #41
This commit is contained in:
Gergely Polonkai 2018-07-11 12:49:11 +02:00
parent 303dd3d082
commit 7b935afdad

View File

@ -217,7 +217,7 @@ class CalendarSocialApp(Flask):
form = EventForm()
if form.validate_on_submit():
event = Event(user=current_user)
event = Event(profile=current_user.profile)
form.populate_obj(event)
db.session.add(event)