Révision 9dbbb15b
Ajouté par Jérôme Schneider il y a plus de 9 ans
mandaye/backends/sql.py | ||
---|---|---|
57 | 57 |
""" return an dict of the association with the id or None if it doesn't exist """ |
58 | 58 |
sp_user = storage_conn.query(SPUser).\ |
59 | 59 |
filter(SPUser.id==asso_id).first() |
60 |
return Association.sp_user2association(sp_user) |
|
60 |
if sp_user: |
|
61 |
return Association.sp_user2association(sp_user) |
|
62 |
return None |
|
61 | 63 |
|
62 | 64 |
@staticmethod |
63 | 65 |
def has_id(asso_id): |
Formats disponibles : Unified diff
sql backend: test if sp_user exists