BigW Consortium Gitlab
Fix pipeline error when trying to read empty merge request diff When a user pushed something which resulted an empty merge request diff, `st_commits` would be `nil`. Therefore we also need to check if there exists `st_commits`. We could tell this from: ``` ruby def commits @commits ||= load_commits(st_commits || []) end ``` and ``` ruby def save_commits new_attributes = {} commits = compare.commits if commits.present? commits = Commit.decorate(commits, merge_request.source_project).reverse new_attributes[:st_commits] = dump_commits(commits) end update_columns_serialized(new_attributes) end ``` Closes #22438 See merge request !6470
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
assets | Loading commit data... | |
controllers | Loading commit data... | |
finders | Loading commit data... | |
helpers | Loading commit data... | |
mailers | Loading commit data... | |
models | Loading commit data... | |
policies | Loading commit data... | |
services | Loading commit data... | |
uploaders | Loading commit data... | |
validators | Loading commit data... | |
views | Loading commit data... | |
workers | Loading commit data... |