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