File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +3
-11
lines changed
Original file line number Diff line number Diff line change 61
61
"body" : [
62
62
" import ormar" ,
63
63
" " ,
64
- " from freenit.config import getConfig" ,
65
- " " ,
66
- " from freenit.models.metaclass import AllOptional" ,
67
- " from freenit.models.ormar.base import OrmarBaseModel" ,
68
- " " ,
69
- " config = getConfig()" ,
64
+ " from freenit.models.ormar.base import OrmarBaseModel, generate_optional, ormar_config" ,
70
65
" " ,
71
66
" " ,
72
67
" class ${1}(OrmarBaseModel):" ,
73
- " class Meta(config.meta):" ,
74
- " pass" ,
68
+ " ormar_config = ormar_config.copy()" ,
75
69
" " ,
76
70
" id: int = ormar.Integer(primary_key=True)" ,
77
71
" ${0}" ,
78
72
" " ,
79
- " " ,
80
- " class ${1}Optional(${1}, metaclass=AllOptional):" ,
81
- " pass"
73
+ " ${1}Optional = generate_optional(${1})"
82
74
],
83
75
"description" : " Freenit model using Ormar"
84
76
}
You can’t perform that action at this time.
0 commit comments