fix migration
This commit is contained in:
parent
767c0d7dd0
commit
e809502ecc
2 changed files with 3 additions and 1 deletions
|
@ -34,7 +34,7 @@ def q_owned_piece_visible_to_user(viewing_user: User, owner: APIdentity):
|
|||
or not viewing_user.is_authenticated
|
||||
or not viewing_user.identity
|
||||
):
|
||||
return Q(visibility=0)
|
||||
return Q(owner=owner, visibility=0)
|
||||
viewer = viewing_user.identity
|
||||
if viewer == owner:
|
||||
return Q(owner=owner)
|
||||
|
|
|
@ -1068,6 +1068,8 @@ class Post(models.Model):
|
|||
post.url = post.absolute_object_uri()
|
||||
if _migration_mode:
|
||||
post.state = "fanned_out"
|
||||
if published:
|
||||
post.published = published
|
||||
else:
|
||||
post.mentions.set(mentions)
|
||||
post.emojis.set(emojis)
|
||||
|
|
Loading…
Add table
Reference in a new issue