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 | 119 | filename = html_files[0] |
|
120 | 120 | description.markdowned = false |
|
121 | 121 | else |
|
122 | 122 | filename = markdown_files[0] |
|
123 | 123 | description.markdowned = true |
|
124 | 124 | end |
|
125 | 125 | |
|
126 | 126 | description.body = open(filename).read |
|
127 | 127 | description.save |
|
128 | 128 | @problem.description = description |
|
129 | 129 | @problem.save |
|
130 | 130 | return "\nProblem description imported from #{filename}." |
|
131 | + else | |
|
132 | + return '' | |
|
131 | 133 | end |
|
132 | 134 | end |
|
133 | 135 | |
|
134 | 136 | end |
You need to be logged in to leave comments.
Login now