aboutsummaryrefslogtreecommitdiffstats
path: root/servo/management/commands
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2015-09-15 10:38:01 +0300
committerFilipp Lepalaan <filipp@mac.com>2015-09-15 10:38:01 +0300
commit46619ea770fe8da1b6a9e8e233cb81adcebefb3a (patch)
tree6ca3598782fb33455fa1aeedc658b5b9ed905282 /servo/management/commands
parenta2c673fcd4e39210a81abd6b6a51660aba870b26 (diff)
downloadServo-46619ea770fe8da1b6a9e8e233cb81adcebefb3a.tar.gz
Servo-46619ea770fe8da1b6a9e8e233cb81adcebefb3a.tar.bz2
Servo-46619ea770fe8da1b6a9e8e233cb81adcebefb3a.zip
Rooting out Sites
Diffstat (limited to 'servo/management/commands')
-rwxr-xr-xservo/management/commands/cron.py7
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')