예제 #1
0
 def ensureUserNotExist(cls, **args):
     return ViewUtils.ensureObjectNotExist(
         User, ErrorType.UsernameNotExist, **args)
예제 #2
0
 def ensureFriendNotExist(cls, **args):
     return ViewUtils.ensureObjectNotExist(
         Friend, ErrorType.AlreadyAFriend, **args)
예제 #3
0
		def ensureParticipationNotExist(cls, uid, pid):
			return ViewUtils.ensureObjectNotExist(
				Participation, ErrorType.HaveParticipated,
				user_id=uid, project_id=pid)