1. Francesco Banconi
  2. django-generic-ratings
Issue #19 new

float is required

Francesco Spegni
created an issue

when the method _get_value of class StarWidget is invoked, it raise a Type Error: float is required exception.

It appears that changing the body to:

def _get_value(self, original, split):
    if original:
        value = round(float(original * split)) / split
        return Decimal(str(value))

should suffice to get rid of the error (basically the argument of round should be casted to float)

Comments (0)

  1. Log in to comment