From 7b935afdadc4d67c0bd156141de344812e2371e3 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Wed, 11 Jul 2018 12:49:11 +0200 Subject: [PATCH] [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 --- calsocial/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calsocial/__init__.py b/calsocial/__init__.py index 9b4e3b1..991c1c7 100644 --- a/calsocial/__init__.py +++ b/calsocial/__init__.py @@ -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)