forked from gergely/calendar-social
[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:
parent
303dd3d082
commit
7b935afdad
@ -217,7 +217,7 @@ class CalendarSocialApp(Flask):
|
|||||||
form = EventForm()
|
form = EventForm()
|
||||||
|
|
||||||
if form.validate_on_submit():
|
if form.validate_on_submit():
|
||||||
event = Event(user=current_user)
|
event = Event(profile=current_user.profile)
|
||||||
form.populate_obj(event)
|
form.populate_obj(event)
|
||||||
|
|
||||||
db.session.add(event)
|
db.session.add(event)
|
||||||
|
Loading…
Reference in New Issue
Block a user