Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
Admin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
osuny
Admin
Commits
b04edc22
Unverified
Commit
b04edc22
authored
1 year ago
by
Sébastien Gaya
Browse files
Options
Downloads
Patches
Plain Diff
hotfix where about is nil
parent
091f0dbd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/services/content_migration.rb
+3
-3
3 additions, 3 deletions
app/services/content_migration.rb
with
3 additions
and
3 deletions
app/services/content_migration.rb
+
3
−
3
View file @
b04edc22
...
...
@@ -23,7 +23,7 @@ class ContentMigration
# ignore blocks already inside headings
next
if
block
.
heading
.
present?
# Move title from block to heading
if
block
.
title
.
present?
&&
!
block
.
call_to_action?
# call to actions keep their title
if
block
.
title
.
present?
&&
!
block
.
call_to_action?
# call to actions keep their title
heading
=
object
.
headings
.
create
(
university:
object
.
university
)
heading
.
title
=
block
.
title
heading
.
position
=
heading_position
...
...
@@ -51,8 +51,8 @@ class ContentMigration
def
migrate_objects
(
about_type
)
about_ids
(
about_type
).
each
do
|
about_id
|
object
=
about_type
.
constantize
.
find
(
about_id
)
migrate
(
object
)
if
object
.
university
==
@university
object
=
about_type
.
constantize
.
find
_by
(
id:
about_id
)
migrate
(
object
)
if
object
.
present?
&&
object
.
university
==
@university
end
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment