OSDN Git Service

work
[pettanr/pettanr.git] / app / models / original_picture.rb
index 3004bb5..f29212c 100644 (file)
@@ -53,7 +53,8 @@ class OriginalPicture < Pettanr::Content
   end
   
   def revision
-    self.history.first.revision
+    head = self.history.first
+    head ? head.revision : 'unpublished'
   end
   
   def unpublished?