forgot to add theme version fixes (bug 901604)
This commit is contained in:
Родитель
6223a143f9
Коммит
1279d0dc91
|
@ -631,7 +631,7 @@ class Addon(amo.models.OnChangeMixin, amo.models.ModelBase):
|
|||
# If there are no versions, just create one and go.
|
||||
if not self._current_version:
|
||||
if self._latest_version:
|
||||
self.update(_current_version=_latest_version,
|
||||
self.update(_current_version=self._latest_version,
|
||||
_signal=False)
|
||||
return True
|
||||
return False
|
||||
|
|
|
@ -1438,7 +1438,10 @@ class TestBackupVersion(amo.tests.TestCase):
|
|||
assert self.addon._current_version
|
||||
|
||||
# Test latest version copied to current version if no current version.
|
||||
self.addon.update(_current_version=None, _signal=False)
|
||||
self.addon.update(_current_version=None,
|
||||
_latest_version=Version.objects.create(
|
||||
addon=self.addon, version='0'),
|
||||
_signal=False)
|
||||
assert self.addon.update_version()
|
||||
assert self.addon._current_version == self.addon._latest_version
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче