Description:
fix problem edit page
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r590:0ef720704122 - - 2 files changed: 4 inserted, 4 deleted
@@ -15,7 +15,7 | |||
|
15 | 15 | :create, :quick_create, |
|
16 | 16 | :do_manage, |
|
17 | 17 | :do_import, |
|
18 |
- |
|
|
18 | + ], | |
|
19 | 19 | :redirect_to => { :action => :index } |
|
20 | 20 | |
|
21 | 21 | def show |
@@ -71,14 +71,14 | |||
|
71 | 71 | def update |
|
72 | 72 | @problem = Problem.find(params[:id]) |
|
73 | 73 | @description = @problem.description |
|
74 |
- if @description |
|
|
74 | + if @description.nil? and params[:description][:body]!='' | |
|
75 | 75 | @description = Description.new(params[:description]) |
|
76 | 76 | if !@description.save |
|
77 | 77 | flash[:notice] = 'Error saving description' |
|
78 | 78 | render :action => 'edit' and return |
|
79 | 79 | end |
|
80 | 80 | @problem.description = @description |
|
81 |
- elsif @description |
|
|
81 | + elsif @description | |
|
82 | 82 | if !@description.update_attributes(params[:description]) |
|
83 | 83 | flash[:notice] = 'Error saving description' |
|
84 | 84 | render :action => 'edit' and return |
You need to be logged in to leave comments.
Login now