diff --git a/apps/wpm/services.py b/apps/wpm/services.py index 1dbf5e96..7c5f8d20 100644 --- a/apps/wpm/services.py +++ b/apps/wpm/services.py @@ -134,7 +134,7 @@ def get_pcoal_heat(year_s: int, month_s: int, day_s: int): mgroup__name='回转窑', shift__name__in=['白班', '早班']) # hardcode if qs.pcoal_heat is None or qs.pcoal_heat <=0: s = SfLog.objects.filter(pcoal_heat__isnull=False).order_by('-start_time').first() - if s: + if s and s.pcoal_heat: qs.pcoal_heat = s.pcoal_heat else: qs.pcoal_heat = 25000