Ejemplo n.º 1
0
def remove_state(request,
                 user_profile,
                 keys=REQ(validator=check_list(check_string), default=None)):
    # type: (HttpRequest, UserProfile, Optional[List[str]]) -> HttpResponse
    keys = keys or get_keys_in_bot_state(user_profile)
    try:
        remove_bot_state(user_profile, keys)
    except StateError as e:
        return json_error(str(e))
    return json_success()
Ejemplo n.º 2
0
 def remove(self, key: Text) -> None:
     remove_bot_state(self.user_profile, [key])
Ejemplo n.º 3
0
 def remove(self, key):
     # type: (Text) -> None
     remove_bot_state(self.user_profile, key)
Ejemplo n.º 4
0
 def remove(self, key):
     # type: (Text) -> None
     remove_bot_state(self.user_profile, key)