Added a missing chunk from previous commit.
This commit is contained in:
Родитель
484d64f74a
Коммит
541a65f4d6
|
@ -844,6 +844,7 @@ class TestReviewApp(AppReviewerTest, AccessMixin, AMOPaths):
|
|||
app = self.get_app()
|
||||
eq_(app.make_public, amo.PUBLIC_WAIT)
|
||||
eq_(app.status, amo.STATUS_PUBLIC_WAITING)
|
||||
eq_(map(lambda o: o.id, app.device_types), [amo.DEVICE_DESKTOP.id])
|
||||
|
||||
eq_(len(mail.outbox), 1)
|
||||
msg = mail.outbox[0]
|
||||
|
|
|
@ -22,7 +22,7 @@ import amo
|
|||
from abuse.models import AbuseReport
|
||||
from access import acl
|
||||
from addons.decorators import addon_view
|
||||
from addons.models import Persona, Version
|
||||
from addons.models import AddonDeviceType, Persona, Version
|
||||
from amo import messages
|
||||
from amo.decorators import json_view, permission_required, post_required
|
||||
from amo.helpers import absolutify
|
||||
|
@ -182,6 +182,11 @@ def _review(request, addon):
|
|||
if addon.make_public == amo.PUBLIC_IMMEDIATELY:
|
||||
addon.update(make_public=amo.PUBLIC_WAIT)
|
||||
|
||||
# And update the device types to what the reviewer set.
|
||||
AddonDeviceType.objects.filter(addon=addon).delete()
|
||||
for device in form.cleaned_data.get('device_override'):
|
||||
addon.addondevicetype_set.create(device_type=device)
|
||||
|
||||
form.helper.process()
|
||||
|
||||
if form.cleaned_data.get('notify'):
|
||||
|
|
Загрузка…
Ссылка в новой задаче