mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
post into sub-topics
This commit is contained in:
parent
eed882f061
commit
364287c0d5
1 changed files with 2 additions and 1 deletions
|
@ -203,7 +203,8 @@ def topic_create_post(topic_name):
|
|||
if not topic:
|
||||
abort(404)
|
||||
communities = Community.query.filter_by(topic_id=topic.id, banned=False).order_by(Community.title).all()
|
||||
sub_communities = Community.query.filter_by(banned=False).join(Topic, Topic.parent_id == topic.id).order_by(Community.title).all()
|
||||
child_topics = [topic.id for topic in Topic.query.filter(Topic.parent_id == topic.id).all()]
|
||||
sub_communities = Community.query.filter_by(banned=False).filter(Community.topic_id.in_(child_topics)).order_by(Community.title).all()
|
||||
if request.form.get('community_id', '') != '':
|
||||
community = Community.query.get_or_404(int(request.form.get('community_id')))
|
||||
return redirect(url_for('community.join_then_add', actor=community.link()))
|
||||
|
|
Loading…
Add table
Reference in a new issue