From: Charles Connell Date: Thu, 23 Jan 2014 00:47:06 +0000 (-0500) Subject: Courses don't have a user X-Git-Tag: release-20150131~217 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ad1dd074adc6ed3f8e61445579149bd4d17289cc;p=oweals%2Fkarmaworld.git Courses don't have a user --- 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):