From ad1dd074adc6ed3f8e61445579149bd4d17289cc Mon Sep 17 00:00:00 2001 From: Charles Connell Date: Wed, 22 Jan 2014 19:47:06 -0500 Subject: [PATCH] Courses don't have a user --- karmaworld/apps/courses/views.py | 4 ---- karmaworld/apps/users/models.py | 3 --- 2 files changed, 7 deletions(-) diff --git a/karmaworld/apps/courses/views.py b/karmaworld/apps/courses/views.py index d6957fd..36df93f 100644 --- a/karmaworld/apps/courses/views.py +++ b/karmaworld/apps/courses/views.py @@ -213,10 +213,6 @@ def process_course_flag_events(request_user, course): # Take a point away from person flagging this course if request_user.is_authenticated(): CourseKarmaEvent.create_event(request_user, course, CourseKarmaEvent.GIVE_FLAG) - # If this is the 6th time this course has been flagged, - # punish the uploader - if course.flags == 6: - CourseKarmaEvent.create_event(course.user, course, CourseKarmaEvent.GET_FLAGGED) def flag_course(request, pk): diff --git a/karmaworld/apps/users/models.py b/karmaworld/apps/users/models.py index cc34cc6..de80967 100644 --- a/karmaworld/apps/users/models.py +++ b/karmaworld/apps/users/models.py @@ -138,17 +138,14 @@ class NoteKarmaEvent(BaseKarmaEvent): class CourseKarmaEvent(BaseKarmaEvent): GIVE_FLAG = 'give_flag' - GET_FLAGGED = 'get_flagged' EVENT_TYPE_CHOICES = ( (GIVE_FLAG, "You flagged a course"), - (GET_FLAGGED, "Your course was flagged as spam"), ) course = models.ForeignKey('courses.Course') event_type = models.CharField(max_length=15, choices=EVENT_TYPE_CHOICES) POINTS = { GIVE_FLAG: -1, - GET_FLAGGED: -100 } def get_message(self): -- 2.25.1