Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
9442c335
Commit
9442c335
authored
Jul 28, 2017
by
Athar Hameed
Committed by
Sean McGivern
Jul 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix 500 error when rendering avatar for deleted project creator
parent
883be9c6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletion
+24
-1
app/views/shared/projects/_project.html.haml
app/views/shared/projects/_project.html.haml
+1
-1
changelogs/unreleased/fix-500-error-when-rendering-avatar-for-deleted-project-creator.yml
...ror-when-rendering-avatar-for-deleted-project-creator.yml
+4
-0
spec/views/shared/projects/_project.html.haml_spec.rb
spec/views/shared/projects/_project.html.haml_spec.rb
+19
-0
No files found.
app/views/shared/projects/_project.html.haml
View file @
9442c335
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
-
if
avatar
-
if
avatar
.avatar-container.s40
.avatar-container.s40
=
link_to
project_path
(
project
),
class:
dom_class
(
project
)
do
=
link_to
project_path
(
project
),
class:
dom_class
(
project
)
do
-
if
use_creator_avatar
-
if
project
.
creator
&&
use_creator_avatar
=
image_tag
avatar_icon
(
project
.
creator
.
email
,
40
),
class:
"avatar s40"
,
alt
:''
=
image_tag
avatar_icon
(
project
.
creator
.
email
,
40
),
class:
"avatar s40"
,
alt
:''
-
else
-
else
=
project_icon
(
project
,
alt:
''
,
class:
'avatar project-avatar s40'
)
=
project_icon
(
project
,
alt:
''
,
class:
'avatar project-avatar s40'
)
...
...
changelogs/unreleased/fix-500-error-when-rendering-avatar-for-deleted-project-creator.yml
0 → 100644
View file @
9442c335
---
title
:
Modify if condition to be more readable
merge_request
:
author
:
spec/views/shared/projects/_project.html.haml_spec.rb
0 → 100644
View file @
9442c335
require
'spec_helper'
describe
'shared/projects/_project.html.haml'
do
let
(
:project
)
{
create
(
:empty_project
)
}
it
'should render creator avatar if project has a creator'
do
render
'shared/projects/project'
,
use_creator_avatar:
true
,
project:
project
expect
(
rendered
).
to
have_selector
(
'img.avatar'
)
end
it
'should render a generic avatar if project does not have a creator'
do
project
.
creator
=
nil
render
'shared/projects/project'
,
use_creator_avatar:
true
,
project:
project
expect
(
rendered
).
to
have_selector
(
'.project-avatar'
)
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment