mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-10 02:05:10 +00:00
Make sure my_vote is consistently missing if not voted. Fixes #3197
This commit is contained in:
parent
dfc74835b1
commit
02736d4df7
|
@ -47,6 +47,7 @@ pub struct GetPost {
|
|||
pub comment_id: Option<CommentId>,
|
||||
}
|
||||
|
||||
#[skip_serializing_none]
|
||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||
#[cfg_attr(feature = "full", derive(TS))]
|
||||
#[cfg_attr(feature = "full", ts(export))]
|
||||
|
|
|
@ -546,12 +546,6 @@ impl PostView {
|
|||
.read(pool, (post_id, my_person_id, is_mod_or_admin))
|
||||
.await?;
|
||||
|
||||
// If a person is given, then my_vote, if None, should be 0, not null
|
||||
// Necessary to differentiate between other person's votes
|
||||
if my_person_id.is_some() && res.my_vote.is_none() {
|
||||
res.my_vote = Some(0)
|
||||
};
|
||||
|
||||
Ok(res)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ services:
|
|||
|
||||
lemmy-ui:
|
||||
# use "image" to pull down an already compiled lemmy-ui. make sure to comment out "build".
|
||||
image: dessalines/lemmy-ui:0.18.4
|
||||
image: dessalines/lemmy-ui:0.19.0-rc.3
|
||||
# platform: linux/x86_64 # no arm64 support. uncomment platform if using m1.
|
||||
# use "build" to build your local lemmy ui image for development. make sure to comment out "image".
|
||||
# run: docker compose up --build
|
||||
|
|
Loading…
Reference in a new issue