Exemple #1
0
 def botname_validator(self, value):
     """ Check if botname is unique """
     if Bot.exists(value):
         raise ValueError('botname should be unique')
     else:
         return value
Exemple #2
0
 def delete_bot_validator(self, value):
     if Bot.exists(value):
         return value
     else:
         abort(400, botname='botname does\'t exist')
Exemple #3
0
 def botname_validator(self, value):
     if Bot.exists(value):
         return value
     else:
         raise ValueError('botname does\'t exist')