summaryrefslogtreecommitdiff
path: root/factory/fuzzy.py
diff options
context:
space:
mode:
Diffstat (limited to 'factory/fuzzy.py')
-rw-r--r--factory/fuzzy.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/factory/fuzzy.py b/factory/fuzzy.py
index 923d8b7..a7e834c 100644
--- a/factory/fuzzy.py
+++ b/factory/fuzzy.py
@@ -164,7 +164,7 @@ class FuzzyDecimal(BaseFuzzyAttribute):
super(FuzzyDecimal, self).__init__(**kwargs)
def fuzz(self):
- base = compat.float_to_decimal(_random.uniform(self.low, self.high))
+ base = decimal.Decimal(str(_random.uniform(self.low, self.high)))
return base.quantize(decimal.Decimal(10) ** -self.precision)