models.py: histogram: cannot take minimum from empty list