mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-28 12:00:01 +02:00
Fix the display of project type for deleted projects (#31732)
Fix: #31727 After:  (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:
parent
49eb831663
commit
c784a58740
4 changed files with 19 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue