예제 #1
0
파일: api.py 프로젝트: xorduna/telemock
 def botname_validator(self, value):
     """ Check if botname is unique """
     if Bot.exists(value):
         raise ValueError('botname should be unique')
     else:
         return value
예제 #2
0
파일: api.py 프로젝트: xorduna/telemock
 def delete_bot_validator(self, value):
     if Bot.exists(value):
         return value
     else:
         abort(400, botname='botname does\'t exist')
예제 #3
0
파일: api.py 프로젝트: xorduna/telemock
 def botname_validator(self, value):
     if Bot.exists(value):
         return value
     else:
         raise ValueError('botname does\'t exist')