Answer the question
In order to leave comments, you need to log in
Where is the token creation error?
there is a function to get the token
but it doesn't pass correctly
def get_message_token(self) -> str:
""" Get message token from database """
_name = "get_message_token"
try:
company_object = userModels.Company.objects.get(
id=self.meeting["company"])
token = models.MessageToken.objects.get(
company=company_object).token
libenv._debug(
f"[*] {__name__}: {_name}: \
Company {company_object} assigned token: {token}")
return token
except models.MessageToken.DoesNotExist:
token = models.MessageToken.objects.get(is_default=True).token
libenv._debug(
f"[*] {__name__}: {_name}: \
Default token assigned for \
{self.meeting['company']}: {token.token}")
return token
except Exception as e:
raise e
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question