We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be7c673 commit 8e56417Copy full SHA for 8e56417
src/schemas/models.py
@@ -40,7 +40,7 @@ class Message(BaseModel):
40
subject: Optional[str] = ''
41
body: Optional[str] = ''
42
attachments: Optional[List[str]] = []
43
- cost: float = 0
+ cost: Optional[float] = 0
44
extra: Json
45
vector: Optional[str] = ''
46
@@ -71,7 +71,7 @@ def parsed_details(self):
71
'update_ts': self.update_ts,
72
'status': self.get_status_display(),
73
'method': self.method,
74
- 'cost': self.cost,
+ 'cost': self.cost or 0,
75
}
76
77
def get_attachments(self):
src/views/messages.py
@@ -37,6 +37,7 @@
37
V('status'),
38
V('method'),
39
V('attachments'),
+ V('cost'),
]
)
0 commit comments