9426: tags display
[arvados.git] / apps / workbench / app / controllers / collections_controller.rb
index 8b3cc2feb860f2483b5572930ca5a4ac32053cb1..8e1e8a5b521c8e6bb748840f39d9ad66b653b0f7 100644 (file)
@@ -345,12 +345,19 @@ class CollectionsController < ApplicationController
     end
   end
 
+  def tags
+    render
+  end
+
   def save_tags
-    props = @object.properties
-    props[:tags] = params['tag_data']
-    if @object.update_attributes properties: props
-    else
-      self.render_error status: 422
+    if params['tag_data']
+      props = @object.properties
+      props[:tags] = params['tag_data']
+
+      if @object.update_attributes properties: props
+      else
+        self.render_error status: 422
+      end
     end
   end