Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Migrate free apps without world AER (bug 916853) #1146

Conversation

muffinresearch
Copy link
Contributor

Adds a management command to migrate free apps without a worldwide AddonExcludedRegion (AER) record to have enable_new_regions=True (bug 916853)



class Command(NoArgsCommand):
help = "Migrate free apps without a world AER to enable_new_regions=True."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

single quotes

@muffinresearch
Copy link
Contributor Author

@cvan, @diox, @robhudson, @andymckay: Any further comments?

@cvan
Copy link
Contributor

cvan commented Sep 26, 2013

and the code that determines when to check/uncheck the box - that gets changed in some other PR, I presume?

@cvan
Copy link
Contributor

cvan commented Sep 26, 2013

r+wc

self.webapp.update(premium_type=amo.ADDON_PREMIUM)
eq_(self.webapp.enable_new_regions, False)
eq_(len(AER.objects.filter(addon=self.webapp,
region=WORLDWIDE.id)), 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eq_(not AER.objects.filter(addon=self.webapp, region=WORLDWIDE.id).exists()) maybe

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eq_(self.webapp.addonexcludedregion.filter(region=WORLDWIDE.id).count(), 0)

@andymckay
Copy link
Contributor

r+wc

Cmd to migrate free apps to enable_new_regions (bug 916853)
muffinresearch added a commit that referenced this pull request Sep 27, 2013
…thout-world-aer-916853

Migrate free apps without world AER (bug 916853)
@muffinresearch muffinresearch merged commit 2748d5e into mozilla:master Sep 27, 2013
@muffinresearch muffinresearch deleted the cmd-migrate-free-apps-without-world-aer-916853 branch September 27, 2013 20:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
6 participants