[PR #2504] [MERGED] fixes 500 error on dashboard when using MSSQL #16436

Closed
opened 2025-11-02 12:10:35 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/2504
Author: @bradder555
Created: 9/14/2017
Status: Merged
Merged: 9/15/2017
Merged by: @lafriks

Base: masterHead: fixes_500_error_on_dashboard


📝 Commits (2)

  • fb971d0 fixes 500 error on dashboard when using MSSQL
  • 760f89a Merge branch 'master' into fixes_500_error_on_dashboard

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 models/org.go (+1 -1)

📄 Description

MSSQL rejects the query:

  SELECT "repository"."id" FROM "repository"
  INNER JOIN "team_repo" ON "team_repo".repo_id="repository".id AND
  "repository".is_mirror=1
  WHERE (
    ("repository".owner_id=2 AND "repository".is_private=0)
        OR team_repo.team_id IN (1)
        )
        GROUP BY "repository".id ORDER BY updated_unix DESC

when the order by term (updated_unix) is not included in the group by term.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/2504 **Author:** [@bradder555](https://github.com/bradder555) **Created:** 9/14/2017 **Status:** ✅ Merged **Merged:** 9/15/2017 **Merged by:** [@lafriks](https://github.com/lafriks) **Base:** `master` ← **Head:** `fixes_500_error_on_dashboard` --- ### 📝 Commits (2) - [`fb971d0`](https://github.com/go-gitea/gitea/commit/fb971d0a5f40937ba4c659d6061145d3f6546d19) fixes 500 error on dashboard when using MSSQL - [`760f89a`](https://github.com/go-gitea/gitea/commit/760f89a05a99043a1f2496da98d0e8a1073171b7) Merge branch 'master' into fixes_500_error_on_dashboard ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `models/org.go` (+1 -1) </details> ### 📄 Description MSSQL rejects the query: ``` SELECT "repository"."id" FROM "repository" INNER JOIN "team_repo" ON "team_repo".repo_id="repository".id AND "repository".is_mirror=1 WHERE ( ("repository".owner_id=2 AND "repository".is_private=0) OR team_repo.team_id IN (1) ) GROUP BY "repository".id ORDER BY updated_unix DESC ``` when the order by term (updated_unix) is not included in the group by term. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 12:10:35 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#16436