Update flags on saving to backend

This commit is contained in:
Michal Čihař 2012-03-01 16:32:11 +01:00
parent 47754d1e74
commit 04026d4935

View File

@ -412,6 +412,10 @@ class Unit(models.Model):
# Store to backend # Store to backend
(saved, pounit) = self.translation.update_unit(self, request) (saved, pounit) = self.translation.update_unit(self, request)
self.translated = pounit.istranslated() self.translated = pounit.istranslated()
if hasattr(pounit, 'typecomments'):
self.flags = ', '.join(pounit.typecomments)
else:
self.flags = ''
self.save(backend = True) self.save(backend = True)
self.translation.update_stats() self.translation.update_stats()
# Propagate to other projects # Propagate to other projects