From c5cac9b91385fbf8fa2e10368f8dc6c7e3e4a5a8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bodor=20M=C3=A1t=C3=A9?= <bodor.mate@kszk.bme.hu>
Date: Sat, 16 Feb 2019 11:17:12 +0100
Subject: [PATCH] bug fix

---
 src/common/email.py                | 6 +++---
 src/common/emails/registration.txt | 2 +-
 src/stats/views.py                 | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/common/email.py b/src/common/email.py
index 0c8d6b3..5f4535d 100644
--- a/src/common/email.py
+++ b/src/common/email.py
@@ -1,8 +1,8 @@
 from django.core.mail import send_mail
 import codecs
 
-sender_email = 'noreply@kszkepzes.sch.bme.hu'
-link = 'kszkepzes.sch.bme.hu/homework'
+sender_email = 'noreply@ujonc.sch.bme.hu'
+link = 'https://ujonc.sch.bme.hu/homework'
 
 
 def read_email(name):
@@ -14,7 +14,7 @@ def read_email(name):
 def registration(user):
     subject = "KszkĂŠpzĂŠs regisztrĂĄciĂł"
     message = read_email('registration.txt')
-    message = str.format(message % {'name': user.get_full_name()})
+    message = str.format(message % {'name': user.first_name})
     send_mail(subject, message, sender_email, [user.email, ])
 
 
diff --git a/src/common/emails/registration.txt b/src/common/emails/registration.txt
index f9068e2..bfe0c4e 100644
--- a/src/common/emails/registration.txt
+++ b/src/common/emails/registration.txt
@@ -1,4 +1,4 @@
-ďťżKedves %(name)s!
+ďťżSzia!
 
 Örömmel vettük jelenkezésedet az idei KSZKépzés programunkba. Azonban ahhoz, hogy ezt el is tudjuk bírálni, még szükségünk van pár dologra tőled:
 	- ki kell tĂśltened a profilodat,
diff --git a/src/stats/views.py b/src/stats/views.py
index 393de2c..c917e47 100644
--- a/src/stats/views.py
+++ b/src/stats/views.py
@@ -25,9 +25,9 @@ class NoteViewSet(viewsets.ModelViewSet):
         profile_id = self.request.query_params.get('profileID', None)
         event_id = self.request.query_params.get('eventID', None)
         if profile_id is not None and event_id is not None:
-            return queryset.filter(user=profile_id, event=event_id)
+            return queryset.filter(profile=profile_id, event=event_id)
         if profile_id is not None:
-            return queryset.filter(user=profile_id)
+            return queryset.filter(profile=profile_id)
         if event_id is not None:
             return queryset.filter(event=event_id)
         return queryset
-- 
GitLab