material price should always return a float
This commit is contained in:
@@ -38,7 +38,7 @@ class Material(db.Model):
|
|||||||
@property
|
@property
|
||||||
def price(self):
|
def price(self):
|
||||||
if self.material_price is not None:
|
if self.material_price is not None:
|
||||||
return self.material_price.price
|
return float(self.material_price.price)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def to_json(self):
|
def to_json(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user