File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ pub struct Issue {
153
153
#[ table_name = "issuecomment" ]
154
154
#[ changeset_options( treat_none_as_null = "true" ) ]
155
155
pub struct IssueComment {
156
+ #[ serde( serialize_with = "super::unsigned" ) ]
156
157
pub id : i32 ,
157
158
pub fk_issue : i32 ,
158
159
pub fk_user : i32 ,
Original file line number Diff line number Diff line change 2
2
pub mod github;
3
3
pub mod rfcbot;
4
4
pub mod schema;
5
+
6
+ fn unsigned < S > ( v : & i32 , s : S ) -> Result < S :: Ok , S :: Error >
7
+ where
8
+ S : serde:: ser:: Serializer ,
9
+ {
10
+ s. serialize_u32 ( * v as u32 )
11
+ }
Original file line number Diff line number Diff line change @@ -23,7 +23,9 @@ pub struct Poll {
23
23
pub id : i32 ,
24
24
pub fk_issue : i32 ,
25
25
pub fk_initiator : i32 ,
26
+ #[ serde( serialize_with = "super::unsigned" ) ]
26
27
pub fk_initiating_comment : i32 ,
28
+ #[ serde( serialize_with = "super::unsigned" ) ]
27
29
pub fk_bot_tracking_comment : i32 ,
28
30
pub poll_question : String ,
29
31
pub poll_created_at : NaiveDateTime ,
@@ -71,8 +73,10 @@ pub struct FcpProposal {
71
73
pub id : i32 ,
72
74
pub fk_issue : i32 ,
73
75
pub fk_initiator : i32 ,
76
+ #[ serde( serialize_with = "super::unsigned" ) ]
74
77
pub fk_initiating_comment : i32 ,
75
78
pub disposition : String ,
79
+ #[ serde( serialize_with = "super::unsigned" ) ]
76
80
pub fk_bot_tracking_comment : i32 ,
77
81
pub fcp_start : Option < NaiveDateTime > ,
78
82
pub fcp_closed : bool ,
You can’t perform that action at this time.
0 commit comments