Fakultas Ilmu Komputer UI

Commit b88111ad authored by Nurma Ayu Wigati S. Subroto's avatar Nurma Ayu Wigati S. Subroto
Browse files

[#45] Update Rating

parent 19dcd337
Pipeline #60699 passed with stages
in 20 minutes and 48 seconds
......@@ -307,9 +307,6 @@ class Rating(models.Model):
super().save(force_insert, force_update, using, update_fields)
else:
raise ValidationError("Rating score must be integer between 1-5")
def edit(self):
rating = Rating.objects.filter(materi=self)
def __str__(self):
return "Material:{} | User:{} | Rating:{}".format(self.materi.title, self.user.name, self.score)
......@@ -332,9 +329,6 @@ class RatingContributor(models.Model):
super().save(force_insert, force_update, using, update_fields)
else:
raise ValidationError("Rating score must be integer between 1-5")
def edit(self):
rating = Rating.objects.filter(materi=self)
class Meta:
unique_together = ["contributor", "user"]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment