mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-18 07:52:23 +01:00
(bug) updating a ressource removes the image
This commit is contained in:
parent
dd30f79f7c
commit
048a640197
@ -1,6 +1,7 @@
|
|||||||
# Changelog Fab-manager
|
# Changelog Fab-manager
|
||||||
|
|
||||||
- Improved fix_invoice_item task
|
- Improved fix_invoice_item task
|
||||||
|
- Fix a bug: updating a space/machine/event/training removes the image
|
||||||
- Fix a bug: cryptic error message when failed to create a manager
|
- Fix a bug: cryptic error message when failed to create a manager
|
||||||
- Fix a bug: unable to restore accounting periods closed by a deleted admin
|
- Fix a bug: unable to restore accounting periods closed by a deleted admin
|
||||||
- Fix a bug: unable to build an acocunting archive if the operator was deleted
|
- Fix a bug: unable to build an acocunting archive if the operator was deleted
|
||||||
|
@ -95,7 +95,7 @@ class API::EventsController < API::ApiController
|
|||||||
:amount, :nb_total_places, :availability_id, :all_day, :recurrence,
|
:amount, :nb_total_places, :availability_id, :all_day, :recurrence,
|
||||||
:recurrence_end_at, :category_id, :event_theme_ids, :age_range_id,
|
:recurrence_end_at, :category_id, :event_theme_ids, :age_range_id,
|
||||||
event_theme_ids: [],
|
event_theme_ids: [],
|
||||||
event_image_attributes: [:attachment],
|
event_image_attributes: %i[id attachment],
|
||||||
event_files_attributes: %i[id attachment _destroy],
|
event_files_attributes: %i[id attachment _destroy],
|
||||||
event_price_categories_attributes: %i[id price_category_id amount _destroy],
|
event_price_categories_attributes: %i[id price_category_id amount _destroy],
|
||||||
advanced_accounting_attributes: %i[code analytical_section])
|
advanced_accounting_attributes: %i[code analytical_section])
|
||||||
|
@ -50,7 +50,7 @@ class API::MachinesController < API::ApiController
|
|||||||
|
|
||||||
def machine_params
|
def machine_params
|
||||||
params.require(:machine).permit(:name, :description, :spec, :disabled, :machine_category_id, :plan_ids, :reservable,
|
params.require(:machine).permit(:name, :description, :spec, :disabled, :machine_category_id, :plan_ids, :reservable,
|
||||||
plan_ids: [], machine_image_attributes: [:attachment],
|
plan_ids: [], machine_image_attributes: %i[id attachment],
|
||||||
machine_files_attributes: %i[id attachment _destroy],
|
machine_files_attributes: %i[id attachment _destroy],
|
||||||
advanced_accounting_attributes: %i[code analytical_section])
|
advanced_accounting_attributes: %i[code analytical_section])
|
||||||
end
|
end
|
||||||
|
@ -50,7 +50,7 @@ class API::SpacesController < API::ApiController
|
|||||||
|
|
||||||
def space_params
|
def space_params
|
||||||
params.require(:space).permit(:name, :description, :characteristics, :default_places, :disabled,
|
params.require(:space).permit(:name, :description, :characteristics, :default_places, :disabled,
|
||||||
space_image_attributes: [:attachment],
|
space_image_attributes: %i[id attachment],
|
||||||
space_files_attributes: %i[id attachment _destroy],
|
space_files_attributes: %i[id attachment _destroy],
|
||||||
advanced_accounting_attributes: %i[code analytical_section])
|
advanced_accounting_attributes: %i[code analytical_section])
|
||||||
end
|
end
|
||||||
|
@ -76,7 +76,7 @@ class API::TrainingsController < API::ApiController
|
|||||||
def training_params
|
def training_params
|
||||||
params.require(:training)
|
params.require(:training)
|
||||||
.permit(:id, :name, :description, :machine_ids, :plan_ids, :nb_total_places, :public_page, :disabled,
|
.permit(:id, :name, :description, :machine_ids, :plan_ids, :nb_total_places, :public_page, :disabled,
|
||||||
training_image_attributes: [:attachment], machine_ids: [], plan_ids: [],
|
training_image_attributes: %i[id attachment], machine_ids: [], plan_ids: [],
|
||||||
advanced_accounting_attributes: %i[code analytical_section])
|
advanced_accounting_attributes: %i[code analytical_section])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user