Commit 0f52a18b authored by Michal Čihař's avatar Michal Čihař

Fix adding of units to non LISA stores

parent 277c0316
...@@ -42,6 +42,7 @@ import traceback ...@@ -42,6 +42,7 @@ import traceback
import importlib import importlib
import __builtin__ import __builtin__
from translate.storage import factory from translate.storage import factory
from translate.storage.lisa import LISAfile
from translate.storage import poheader from translate.storage import poheader
from datetime import datetime, timedelta from datetime import datetime, timedelta
...@@ -1639,7 +1640,12 @@ class Translation(models.Model): ...@@ -1639,7 +1640,12 @@ class Translation(models.Model):
else: else:
pounit.settarget(unit.target) pounit.settarget(unit.target)
# Add unit to translation file # Add unit to translation file
store.addunit(pounit, new = add) if new:
if isinstance(store, LISAfile):
# LISA based stores need to know this
store.addunit(pounit, new = True)
else:
store.addunit(pounit)
# We need to update backend # We need to update backend
need_save = True need_save = True
......
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