lib/gitlab/import_export/project_tree_restorer.rb
# Relations which cannot be saved at project level (and have a group assigned)
Relations which cannot be saved at project level (and have a group assigned)
Relations which cannot be saved at project level ( and have a group assigned )
def transform_sub_relations!(data_hash, sub_relation_key, sub_relation_definition)
        sub_data_hash = data_hash[sub_relation_key]
        return unless sub_data_hash
        sub_data_hash =
          if sub_data_hash.is_a?(Array)
            build_relations(
              sub_relation_key,
              sub_relation_definition,
              sub_data_hash).presence
          else
            build_relation(
              sub_relation_key,
              sub_relation_definition,
              sub_data_hash)
          end
        if sub_data_hash
          data_hash[sub_relation_key] = sub_data_hash
        else
          data_hash.delete(sub_relation_key)
        end
      end
def transform_sub_relations! ( data_hash , sub_relation_key , sub_relation_definition ) sub_data_hash = data_hash [ sub_relation_key ] return unless sub_data_hash sub_data_hash = if sub_data_hash . is_a? ( Array ) build_relations ( sub_relation_key , sub_relation_definition , sub_data_hash ) . presence else build_relation ( sub_relation_key , sub_relation_definition , sub_data_hash ) end if sub_data_hash data_hash [ sub_relation_key ] = sub_data_hash else data_hash . delete ( sub_relation_key ) end end
Relations which cannot be saved at project level (and have a group assigned)
Relations which cannot be saved at project level ( and have a group assigned )
# if object is a hash we can create simple object # as it means that this is 1-to-1 vs 1-to-many # persist object(s) or delete from relation
data_hash
<not_specific>
sub_relation_key
<not_specific>
sub_relation_definition
<not_specific>