Revision 04e8a251 snf-astakos-app/astakos/im/functions.py
b/snf-astakos-app/astakos/im/functions.py | ||
---|---|---|
279 | 279 |
inviter.invitations = max(0, inviter.invitations - 1) |
280 | 280 |
inviter.save() |
281 | 281 |
|
282 |
def set_user_credibility(email, has_credits): |
|
283 |
try: |
|
284 |
user = AstakosUser.objects.get(email=email, is_active=True) |
|
285 |
user.has_credits = has_credits |
|
286 |
user.save() |
|
287 |
except AstakosUser.DoesNotExist, e: |
|
288 |
logger.exception(e) |
|
289 |
except ValidationError, e: |
|
290 |
logger.exception(e) |
|
291 |
|
|
292 | 282 |
class SendMailError(Exception): |
293 | 283 |
pass |
294 | 284 |
|
Also available in: Unified diff