mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
beware of upper and lower case in community url
This commit is contained in:
parent
fec2d24e6d
commit
a17e3273bf
1 changed files with 2 additions and 2 deletions
|
@ -117,7 +117,7 @@ def retrieve_mods_and_backfill(community_id: int):
|
|||
|
||||
|
||||
def community_url_exists(url) -> bool:
|
||||
community = Community.query.filter_by(ap_profile_id=url).first()
|
||||
community = Community.query.filter(Community.ap_profile_id.ilike(url)).first()
|
||||
return community is not None
|
||||
|
||||
|
||||
|
@ -126,7 +126,7 @@ def actor_to_community(actor) -> Community:
|
|||
if '@' in actor:
|
||||
community = Community.query.filter_by(banned=False, ap_id=actor).first()
|
||||
else:
|
||||
community = Community.query.filter_by(name=actor, banned=False, ap_id=None).first()
|
||||
community = Community.query.filter(Community.name.ilike(actor)).filter_by(banned=False, ap_id=None).first()
|
||||
return community
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue