bug when editing post

This commit is contained in:
rimu 2024-03-24 20:58:25 +13:00
parent c0f526d70f
commit 5c5c28a4a3

View file

@ -136,6 +136,7 @@ class CreatePostForm(FlaskForm):
current_user.reputation -= 1 current_user.reputation -= 1
db.session.commit() db.session.commit()
return False return False
if self.communities:
community = Community.query.get(self.communities.data) community = Community.query.get(self.communities.data)
if community.is_local() and g.site.allow_local_image_posts is False: if community.is_local() and g.site.allow_local_image_posts is False:
self.communities.errors.append(_('Images cannot be posted to local communities.')) self.communities.errors.append(_('Images cannot be posted to local communities.'))