mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-06 08:08:37 +02:00
Fix the display of project type for deleted projects (#31732)
Fix: #31727 After: 
This commit is contained in:
1 parent
0a11bce87f
commit
75d0b61546
4 files changed
+19
-5
No files matched your search
@@ -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