mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 11:26:56 -08:00
Keep post.cross_posts at null instead of empty array if they don't have any
This commit is contained in:
parent
d64dde5468
commit
e85a0ddd9a
1 changed files with 1 additions and 1 deletions
|
@ -1457,7 +1457,7 @@ class Post(db.Model):
|
|||
ncp.cross_posts.append(self.id)
|
||||
|
||||
# this post: set the cross_posts field to the limited list of ids from the most recent other posts
|
||||
if new_cross_posts:
|
||||
if new_cross_posts.count() > 0:
|
||||
self.cross_posts = [ncp.id for ncp in new_cross_posts]
|
||||
db.session.commit()
|
||||
|
||||
|
|
Loading…
Reference in a new issue