15275: Moves comment to its proper place.
authorLucas Di Pentima <ldipentima@veritasgenetics.com>
Fri, 24 May 2019 13:31:40 +0000 (10:31 -0300)
committerLucas Di Pentima <ldipentima@veritasgenetics.com>
Fri, 24 May 2019 15:50:52 +0000 (12:50 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima@veritasgenetics.com>

services/api/app/models/collection.rb

index 739be4ec93d0390e5bb1f7097d9e767be5bedbe8..82ba499cde87bfcb5e9066a86f627f220dc8b99e 100644 (file)
@@ -326,6 +326,8 @@ class Collection < ArvadosModel
   end
 
   def is_past_version?
+    # Check for the '_was' values just in case the update operation
+    # includes a change on current_version_uuid or uuid.
     if !new_record? && self.current_version_uuid_was != self.uuid_was
       return true
     else
@@ -661,8 +663,6 @@ class Collection < ArvadosModel
   end
 
   def past_versions_cannot_be_updated
-    # We check for the '_was' values just in case the update operation
-    # includes a change on current_version_uuid or uuid.
     if is_past_version?
       errors.add(:base, "past versions cannot be updated")
       false