diff options
author | Filipp Lepalaan <filipp@mac.com> | 2015-09-15 10:38:01 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2015-09-15 10:38:01 +0300 |
commit | 46619ea770fe8da1b6a9e8e233cb81adcebefb3a (patch) | |
tree | 6ca3598782fb33455fa1aeedc658b5b9ed905282 /servo/management/commands | |
parent | a2c673fcd4e39210a81abd6b6a51660aba870b26 (diff) | |
download | Servo-46619ea770fe8da1b6a9e8e233cb81adcebefb3a.tar.gz Servo-46619ea770fe8da1b6a9e8e233cb81adcebefb3a.tar.bz2 Servo-46619ea770fe8da1b6a9e8e233cb81adcebefb3a.zip |
Rooting out Sites
Diffstat (limited to 'servo/management/commands')
-rwxr-xr-x | servo/management/commands/cron.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/servo/management/commands/cron.py b/servo/management/commands/cron.py index e2831e9..519cbb4 100755 --- a/servo/management/commands/cron.py +++ b/servo/management/commands/cron.py @@ -92,9 +92,8 @@ class Command(BaseCommand): now = timezone.now() limit = now - timedelta(days=1) - locations = Location.objects.filter(site_id=settings.SITE_ID) - for l in locations: + for l in Location.objects.filter(enabled=True): table = CsvTable() table.addheader(['Order', 'Assigned To', 'Status', 'Days red']) @@ -126,9 +125,7 @@ class Command(BaseCommand): except KeyError: raise ValueError('Default sender address not defined') - locations = Location.objects.filter(site_id=settings.SITE_ID) - - for l in locations: + for l in Location.objects.filter(enabled=True): out_of_stock = Inventory.objects.filter( location=l, amount_stocked__lt=F('amount_minimum') |