change open time of kfet service
This commit is contained in:
parent
3b23c28965
commit
9935fe376b
|
@ -213,7 +213,7 @@ class Command(BaseCommand):
|
||||||
|
|
||||||
def sanitize(opes):
|
def sanitize(opes):
|
||||||
# return opes.extra(select={'hour': "EXTRACT(hour FROM kfet_operationgroup.at)"}, having=["`hour` >= 17 OR `hour` <= 5"])
|
# return opes.extra(select={'hour': "EXTRACT(hour FROM kfet_operationgroup.at)"}, having=["`hour` >= 17 OR `hour` <= 5"])
|
||||||
return opes.extra(where=["EXTRACT(HOUR FROM kfet_operationgroup.at) >= 17 OR EXTRACT(HOUR FROM kfet_operationgroup.at) <= 5"])
|
return opes.extra(where=["EXTRACT(HOUR FROM kfet_operationgroup.at) >= 18 OR EXTRACT(HOUR FROM kfet_operationgroup.at) <= 4"])
|
||||||
|
|
||||||
opes = Operation.objects.filter(type='PURCHASE', canceled_at=None)
|
opes = Operation.objects.filter(type='PURCHASE', canceled_at=None)
|
||||||
last_date = opes.order_by('-group__at').first().group.at
|
last_date = opes.order_by('-group__at').first().group.at
|
||||||
|
|
Loading…
Reference in a new issue