Project

General

Profile

Revision ebb00443

Added by Andrew Kofink about 5 years ago

Fixes #19718 - Allow import of unpublished CVs

View differences:

lib/hammer_cli_csv/content_views.rb
124 124
          contentview_id = contentview['id']
125 125

  
126 126
          # Content views cannot be used in composites unless a publish has occurred
127
          publish_content_view(contentview_id, line) if contentview['versions'].empty?
128
          promote_content_view(contentview_id, line)
127
          if contentview['versions'].empty? && !line[ENVIRONMENTS].empty?
128
            publish_content_view(contentview_id, line)
129
          end
130

  
131
          unless line[ENVIRONMENTS].empty?
132
            promote_content_view(contentview_id, line)
133
          end
129 134

  
130 135
          puts _('done') if option_verbose?
131 136
        end

Also available in: Unified diff