Description:
fixed import error when no problem descriptions provided
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r235:41d234115580 - - 1 file changed: 2 inserted, 0 deleted
@@ -119,16 +119,18 | |||||
|
119 | filename = html_files[0] |
|
119 | filename = html_files[0] |
|
120 | description.markdowned = false |
|
120 | description.markdowned = false |
|
121 | else |
|
121 | else |
|
122 | filename = markdown_files[0] |
|
122 | filename = markdown_files[0] |
|
123 | description.markdowned = true |
|
123 | description.markdowned = true |
|
124 | end |
|
124 | end |
|
125 |
|
125 | ||
|
126 | description.body = open(filename).read |
|
126 | description.body = open(filename).read |
|
127 | description.save |
|
127 | description.save |
|
128 | @problem.description = description |
|
128 | @problem.description = description |
|
129 | @problem.save |
|
129 | @problem.save |
|
130 | return "\nProblem description imported from #{filename}." |
|
130 | return "\nProblem description imported from #{filename}." |
|
|
131 | + else | ||
|
|
132 | + return '' | ||
|
131 | end |
|
133 | end |
|
132 | end |
|
134 | end |
|
133 |
|
135 | ||
|
134 | end |
|
136 | end |
You need to be logged in to leave comments.
Login now