mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
lower() the ap_id paramter for get_by_ap_id()
This commit is contained in:
parent
aa444f3417
commit
5b85ee06f5
1 changed files with 2 additions and 2 deletions
|
@ -1142,7 +1142,7 @@ class Post(db.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_by_ap_id(cls, ap_id):
|
def get_by_ap_id(cls, ap_id):
|
||||||
return cls.query.filter_by(ap_id=ap_id).first()
|
return cls.query.filter_by(ap_id=ap_id.lower()).first()
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def new(cls, user: User, community: Community, request_json: dict, announce_id=None):
|
def new(cls, user: User, community: Community, request_json: dict, announce_id=None):
|
||||||
|
@ -1750,7 +1750,7 @@ class PostReply(db.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_by_ap_id(cls, ap_id):
|
def get_by_ap_id(cls, ap_id):
|
||||||
return cls.query.filter_by(ap_id=ap_id).first()
|
return cls.query.filter_by(ap_id=ap_id.lower()).first()
|
||||||
|
|
||||||
def profile_id(self):
|
def profile_id(self):
|
||||||
if self.ap_id:
|
if self.ap_id:
|
||||||
|
|
Loading…
Add table
Reference in a new issue