gpt-3.5-turbo-0301· OpenAI
WildChat-4.8M (AI2)
if (!companies.ContainsKey(user.CompanyTitle)) logger.Warn($"{user.Login}: Неизвестная…
- User
if (!companies.ContainsKey(user.CompanyTitle)) logger.Warn($"{user.Login}: Неизвестная компания {user.CompanyTitle}"); else { var company = companies[user.CompanyTitle]; user.Rights = company.DefaultRights; user.CompanyId = company.Id; }
- Assistant
This code block checks if a dictionary called "companies" contains a key that matches the name of the user's company title. If the key doesn't exist, a warning message is logged indicating that the company is unknown. If the key exists, the corresponding value (which represents a company object) is assigned to a "company" variable. The user's rights are then set to the default rights of the company, and the user's companyId is set to the Id of the company.