File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1
1
from dataclasses import asdict , dataclass
2
- from datetime import datetime
3
2
from typing import Optional , Union
4
3
5
4
from program .models import CONFERENCE , TUTORIAL , SPRINT
@@ -12,8 +11,8 @@ class TicketTypeViewModel:
12
11
class Program :
13
12
title : str
14
13
short_desc : str
15
- start_at : datetime
16
- end_at : datetime
14
+ start_at : Optional [ str ]
15
+ end_at : Optional [ str ]
17
16
program_type : str # type: Union[CONFERENCE, TUTORIAL, SPRINT]
18
17
19
18
id : str
@@ -36,8 +35,8 @@ def __init__(self, model: TicketType):
36
35
self .program = TicketTypeViewModel .Program (
37
36
title = model .program .title ,
38
37
short_desc = model .program .short_desc ,
39
- start_at = model .program .start_at ,
40
- end_at = model .program .end_at ,
38
+ start_at = model .program .start_at . strftime ( "%Y-%m-%dT%H:%M:%S" ) ,
39
+ end_at = model .program .end_at . strftime ( "%Y-%m-%dT%H:%M:%S" ) ,
41
40
program_type = model .program .program_type ,
42
41
)
43
42
self .is_refundable = model .is_refundable
You can’t perform that action at this time.
0 commit comments