app/services/katello/pulp/file_unit.rb in katello-3.11.2 vs app/services/katello/pulp/file_unit.rb in katello-3.12.0.rc1

- old
+ new

@@ -6,8 +6,16 @@ PULP_SELECT_FIELDS = %w(name checksum).freeze PULP_INDEXED_FIELDS = %w(name checksum _id).freeze CONTENT_TYPE = "iso".freeze lazy_accessor :pulp_facts, :initializer => :backend_data + + def update_model(model) + custom_json = {} + custom_json['checksum'] = backend_data['checksum'] + custom_json['path'] = backend_data['name'] + custom_json['name'] = File.basename(backend_data['name']) + model.update_attributes!(custom_json) + end end end end