diff options
Diffstat (limited to 'app/models/version.rb')
-rw-r--r-- | app/models/version.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/version.rb b/app/models/version.rb index f5ac64b74..77228826c 100644 --- a/app/models/version.rb +++ b/app/models/version.rb @@ -316,6 +316,8 @@ class Version < ActiveRecord::Base # Versions are sorted by effective_date and name # Those with no effective_date are at the end, sorted by name def <=>(version) + return nil unless version.is_a?(Version) + if self.effective_date if version.effective_date if self.effective_date == version.effective_date |