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

Update words count on save

parent 0fee36f3
......@@ -726,6 +726,10 @@ class Unit(models.Model):
# Keep the force_insert for parent save
force_insert = kwargs.get('force_insert', False)
# Store number of words
if not same_content:
self.num_words = len(self.get_source_plurals()[0].split())
# Actually save the unit
super(Unit, self).save(*args, **kwargs)
......
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