Commit f48a743c authored by Michal Čihař's avatar Michal Čihař

Bind suggestion to project

parent 9125fe5a
......@@ -415,9 +415,13 @@ class Unit(models.Model):
return mark_safe('\n'.join(ret))
def suggestions(self):
return Suggestion.objects.filter(checksum = self.checksum)
return Suggestion.objects.filter(
checksum = self.checksum,
project = self.translation.subproject.project
)
class Suggestion(models.Model):
checksum = models.CharField(max_length = 40, default = '', blank = True, db_index = True)
target = models.TextField()
user = models.ForeignKey(User, null = True, blank = True)
project = models.ForeignKey(Project)
Markdown is supported
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