WIP: preserve failed Codex job issue-414-euwzily9
このコミットが含まれているのは:
@@ -100,7 +100,8 @@ class MaterialsController < ApplicationController
|
||||
material = nil
|
||||
|
||||
begin
|
||||
Material.transaction do
|
||||
VersionRecorder.record_operation!(
|
||||
event_type: 'materials.create', created_by_user: current_user) do
|
||||
tag = resolve_material_tag!(locale, tag_name_raw)
|
||||
material = Material.new(tag:, url:,
|
||||
created_by_user: current_user,
|
||||
@@ -151,7 +152,8 @@ class MaterialsController < ApplicationController
|
||||
uploaded_blob = build_uploaded_material_blob!(file, file_sha256)
|
||||
|
||||
begin
|
||||
Material.transaction do
|
||||
VersionRecorder.record_operation!(
|
||||
event_type: 'materials.update', created_by_user: current_user) do
|
||||
MaterialVersionRecorder.ensure_snapshot!(material, created_by_user: current_user)
|
||||
tag = resolve_material_tag!(locale, tag_name_raw)
|
||||
material.assign_attributes(tag:, url:, updated_by_user: current_user)
|
||||
@@ -185,7 +187,8 @@ class MaterialsController < ApplicationController
|
||||
material = Material.find_by(id: params[:id])
|
||||
return head :not_found unless material
|
||||
|
||||
Material.transaction do
|
||||
VersionRecorder.record_operation!(
|
||||
event_type: 'materials.destroy', created_by_user: current_user) do
|
||||
MaterialVersionRecorder.ensure_snapshot!(material, created_by_user: current_user)
|
||||
material.discard!
|
||||
MaterialVersionRecorder.record!(material:, event_type: :discard,
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする