diff options
Diffstat (limited to 'models/activities/action.go')
-rw-r--r-- | models/activities/action.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/models/activities/action.go b/models/activities/action.go index a99df558cb..95132f9ced 100644 --- a/models/activities/action.go +++ b/models/activities/action.go @@ -248,6 +248,9 @@ func (a *Action) GetActDisplayNameTitle(ctx context.Context) string { // GetRepoUserName returns the name of the action repository owner. func (a *Action) GetRepoUserName(ctx context.Context) string { a.loadRepo(ctx) + if a.Repo == nil { + return "(non-existing-repo)" + } return a.Repo.OwnerName } @@ -260,6 +263,9 @@ func (a *Action) ShortRepoUserName(ctx context.Context) string { // GetRepoName returns the name of the action repository. func (a *Action) GetRepoName(ctx context.Context) string { a.loadRepo(ctx) + if a.Repo == nil { + return "(non-existing-repo)" + } return a.Repo.Name } |