How about checking if the token exist before creating the same one?
try: self.token_api.get_token(context=context, token_id=token_id) except exception.TokenNotFound: self.token_api.create_token(...
In that case, if token exists, everything is fine (it might even get deleted just after we fetch it).
How about checking if the token exist before creating the same one?
try: token_api. get_token( context= context,
token_ id=token_ id) TokenNotFound: token_api. create_ token(. ..
self.
except exception.
self.
In that case, if token exists, everything is fine (it might even get deleted just after we fetch it).