Made the model User.by_name() case insensitive

This commit is contained in:
Tanshu 2013-04-15 12:43:33 +05:30
parent eaa32d9c3a
commit ddd6883172
1 changed files with 1 additions and 1 deletions

View File

@ -108,7 +108,7 @@ class User(Base):
@classmethod
def by_name(cls, name):
return DBSession.query(cls).filter(cls.name == name).first()
return DBSession.query(cls).filter(cls.name.ilike(name)).first()
@classmethod
def by_id(cls, id):