✨ Feat: [#58] 유저 필드에 값이 있는지 체크하는 함수 구현
This commit is contained in:
@@ -24,6 +24,15 @@ class CheckUserFieldDuplicateService:
|
|||||||
return User.objects.filter(**filter_dict).exists()
|
return User.objects.filter(**filter_dict).exists()
|
||||||
|
|
||||||
|
|
||||||
|
class CheckUserFieldValueExistService:
|
||||||
|
@staticmethod
|
||||||
|
def check_exist(user: User, field) -> bool:
|
||||||
|
if not field:
|
||||||
|
return False
|
||||||
|
if getattr(user, field) == None:
|
||||||
|
return False
|
||||||
|
else:
|
||||||
|
return True
|
||||||
|
|
||||||
class UserToNotificationService:
|
class UserToNotificationService:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user