diff --git a/app/community/forms.py b/app/community/forms.py index fc05feb2..b3713012 100644 --- a/app/community/forms.py +++ b/app/community/forms.py @@ -103,7 +103,7 @@ class CreatePostForm(FlaskForm): current_user.reputation -= 1 db.session.commit() return False - community = Community.query.get(self.communities.data).first() + community = Community.query.get(self.communities.data) if community.is_local() and g.site.allow_local_image_posts is False: self.communities.errors.append(_('Images cannot be posted to local communities.')) elif self.post_type.data == 'poll':