refactor: Improve fallback comment for tenant ID retrieval in ModelAPI

This commit is contained in:
Nawaz Dhandala
2026-01-12 18:30:58 +00:00
parent ce7ed97281
commit 1b498ca5fa

View File

@@ -334,9 +334,11 @@ export default class ModelAPI {
if (project && project.id) {
headers["tenantid"] = project.id.toString();
} else {
// Fallback to getCurrentProjectId() when full project data is not yet loaded
// This can happen after SSO login when the project ID is available in URL/SessionStorage
// but the full project data hasn't been fetched yet
/*
* Fallback to getCurrentProjectId() when full project data is not yet loaded
* This can happen after SSO login when the project ID is available in URL/SessionStorage
* but the full project data hasn't been fetched yet
*/
const projectId: ObjectID | null = ProjectUtil.getCurrentProjectId();
if (projectId) {
headers["tenantid"] = projectId.toString();