aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/app/components/ComponentContainer.tsx')
-rw-r--r--server/sonar-web/src/main/js/app/components/ComponentContainer.tsx11
1 files changed, 9 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx b/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx
index d1cf0ae7c18..31f7ea3ecf6 100644
--- a/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx
+++ b/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx
@@ -133,7 +133,10 @@ export class ComponentContainer extends React.PureComponent<Props, State> {
const { branchLike, branchLikes } = await this.fetchBranches(componentWithQualifier);
- const projectBinding = await getProjectAlmBinding(key).catch(() => undefined);
+ let projectBinding;
+ if (componentWithQualifier.qualifier === ComponentQualifier.Project) {
+ projectBinding = await getProjectAlmBinding(key).catch(() => undefined);
+ }
if (this.mounted) {
this.setState({
@@ -247,7 +250,11 @@ export class ComponentContainer extends React.PureComponent<Props, State> {
};
fetchProjectBindingErrors = async (component: T.Component) => {
- if (component.analysisDate === undefined && this.props.appState.branchesEnabled) {
+ if (
+ component.qualifier === ComponentQualifier.Project &&
+ component.analysisDate === undefined &&
+ this.props.appState.branchesEnabled
+ ) {
const projectBindingErrors = await validateProjectAlmBinding(component.key).catch(
() => undefined
);