add material price setter
This commit is contained in:
@@ -41,6 +41,11 @@ class Material(db.Model):
|
|||||||
return float(self.material_price.price)
|
return float(self.material_price.price)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@price.setter
|
||||||
|
def price(self, value):
|
||||||
|
if self.material_price:
|
||||||
|
self.material_price.price = value
|
||||||
|
|
||||||
def to_json(self):
|
def to_json(self):
|
||||||
return {
|
return {
|
||||||
'id': self.id,
|
'id': self.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user