Created
September 18, 2017 09:00
-
-
Save yershalom/0a2e29cd35cc694ebdca0aee47df6180 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@classmethod | |
def groups_name(cls, email): | |
t = db.session.query(F.unnest(cls.group_ids)).filter(cls.email == email) | |
print "New Q is coming !!!! {}".format(t) | |
print "!!!!!!!!!!!!!!!!!! {} !!!!!!!!".format(cls.group_ids) | |
return list([g.name for g in Group.query.filter(Group.id.in_(cls.query(t)))]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment