mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00:00
Fix the display of project type for deleted projects (#31732)
Fix: #31727 After: 
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user