Avoid returning 'null' for manuallyApprovesFollowers

This commit is contained in:
freamon 2024-03-21 23:26:03 +00:00
parent f7074d2edd
commit 4804c4c4b2
2 changed files with 2 additions and 2 deletions

View file

@ -203,7 +203,7 @@ def user_profile(actor):
"outbox": f"https://{server}/u/{actor}/outbox",
"discoverable": user.searchable,
"indexable": user.indexable,
"manuallyApprovesFollowers": user.ap_manually_approves_followers,
"manuallyApprovesFollowers": False if not user.ap_manually_approves_followers else user.ap_manually_approves_followers,
"publicKey": {
"id": f"https://{server}/u/{actor}#main-key",
"owner": f"https://{server}/u/{actor}",

View file

@ -488,7 +488,7 @@ class User(UserMixin, db.Model):
ap_fetched_at = db.Column(db.DateTime)
ap_followers_url = db.Column(db.String(255))
ap_preferred_username = db.Column(db.String(255))
ap_manually_approves_followers = db.Column(db.Boolean)
ap_manually_approves_followers = db.Column(db.Boolean, default=False)
ap_deleted_at = db.Column(db.DateTime)
ap_inbox_url = db.Column(db.String(255))
ap_domain = db.Column(db.String(255))