At first I thought this might be a bigger issue but on looking I think this change is pretty immaterial - basically if the sale is ended, we don't need to check if it is in the past since that value's existence implies that it is in the past. In addition, the query we use right above these lines is for only active sales - so this code should actually never apply at all.
minor
At first I thought this might be a bigger issue but on looking I think this change is pretty immaterial - basically if the sale is ended, we don't need to check if it is in the past since that value's existence implies that it is in the past. In addition, the query we use right above these lines is for only active sales - so this code should actually never apply at all.