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
Jérome Perrin
gitlab-ce
Commits
7500a12a
Commit
7500a12a
authored
Mar 09, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid error 500 when todo author was removed
parent
cac83cea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+1
-1
app/views/dashboard/todos/_todo.html.haml
app/views/dashboard/todos/_todo.html.haml
+4
-1
No files found.
app/helpers/application_helper.rb
View file @
7500a12a
...
@@ -72,7 +72,7 @@ module ApplicationHelper
...
@@ -72,7 +72,7 @@ module ApplicationHelper
if
user_or_email
.
is_a?
(
User
)
if
user_or_email
.
is_a?
(
User
)
user
=
user_or_email
user
=
user_or_email
else
else
user
=
User
.
find_by
(
email:
user_or_email
.
downcase
)
user
=
User
.
find_by
(
email:
user_or_email
.
try
(
:downcase
)
)
end
end
if
user
if
user
...
...
app/views/dashboard/todos/_todo.html.haml
View file @
7500a12a
...
@@ -4,7 +4,10 @@
...
@@ -4,7 +4,10 @@
.todo-title
.todo-title
%span
.author-name
%span
.author-name
=
link_to_author
todo
-
if
todo
.
author
=
link_to_author
(
todo
)
-
else
(removed)
%span
.todo-label
%span
.todo-label
=
todo_action_name
(
todo
)
=
todo_action_name
(
todo
)
=
todo_target_link
(
todo
)
=
todo_target_link
(
todo
)
...
...
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