Fix the display of project type for deleted projects (#31732)

Fix: #31727
After:

![image](https://github.com/user-attachments/assets/1dfb4b31-3bd6-47f7-b126-650f33f453e2)

(cherry picked from commit 75d0b61546e00390afdd850149de525dd64336a5)

Conflicts:
	options/locale/locale_en-US.ini
  trivial conflict & fix excessive uppercase to unify with the other translations
This commit is contained in:
yp05327 2024-07-30 13:37:43 +09:00 committed by Earl Warren
parent 49eb831663
commit c784a58740
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
4 changed files with 19 additions and 5 deletions

View file

@ -103,6 +103,13 @@ type Project struct {
ClosedDateUnix timeutil.TimeStamp
}
// Ghost Project is a project which has been deleted
const GhostProjectID = -1
func (p *Project) IsGhost() bool {
return p.ID == GhostProjectID
}
func (p *Project) LoadOwner(ctx context.Context) (err error) {
if p.Owner != nil {
return nil