title: Cannot convert float to Decimal. First convert float to a string
body: <p>I get the following error:</p>
  <blockquote>
  <p>02/08 09:15:45&gt; Decimal price: 0.00</p>
  <p>02/08 09:15:45&gt; Decimal price = None</p>
  <p>TypeError: Cannot convert float to Decimal.  First convert the float to a string</p>
  </blockquote>
  <p>Here is my code:</p>
  <pre><code>            s.price = Decimal(&quot;%.2f&quot; % (float(request.data['subscription_price'])))
              log('Decimal price: %s' % s.price)
              
              if s.price == Decimal(&quot;0.00&quot;):
                  s.price = None
                  log('Decimal price = None')
  </code></pre>
  <p>Any ideas about what I am doing wrong?  I tried a hack to avoid saving a 0.00 in the database via the &quot;if s.price == Decimal(&quot;0.00&quot;):&quot; ... to no avail.</p>