diff options
author | Gareth Rees <gareth@mysociety.org> | 2015-04-27 16:18:33 +0100 |
---|---|---|
committer | Gareth Rees <gareth@mysociety.org> | 2015-04-27 16:18:33 +0100 |
commit | 2f2415d8d126423c17dd85d29f8fb543b56b946d (patch) | |
tree | 2badecc581befa352b54c40278e84cd4847096bb /app/models/info_request.rb | |
parent | 0b91fc3469f6110abc9506ef70b625d1ad9bf4f2 (diff) | |
parent | fc573c98372146e4fc7546c7e65cc4719e74205a (diff) |
Merge branch 'hotfix/0.21.0.23'0.21.0.23
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r-- | app/models/info_request.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb index fd42ccd9c..245de1e15 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -803,11 +803,8 @@ public # Text from the the initial request, for use in summary display def initial_request_text - if outgoing_messages.empty? # mainly for use with incomplete fixtures - return "" - end - excerpt = self.outgoing_messages[0].get_text_for_indexing - return excerpt + return '' if outgoing_messages.empty? # mainly for use with incomplete fixtures + outgoing_messages.first.get_text_for_indexing end # Returns index of last event which is described or nil if none described. |