mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 15:09:14 +00:00
[social auth & notification] Add wechat work notification
This commit is contained in:
15
thirdpart/social_django/managers.py
Normal file
15
thirdpart/social_django/managers.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from django.db import models
|
||||
|
||||
|
||||
class UserSocialAuthManager(models.Manager):
|
||||
"""Manager for the UserSocialAuth django model."""
|
||||
|
||||
class Meta:
|
||||
app_label = "social_django"
|
||||
|
||||
def get_social_auth(self, provider, uid):
|
||||
try:
|
||||
return self.select_related('user').get(provider=provider,
|
||||
uid=uid)
|
||||
except self.model.DoesNotExist:
|
||||
return None
|
Reference in New Issue
Block a user