Starbugstone / SnowTricks

OpenClassrooms - Php Symfony App dev - project 6
0 stars 0 forks source link

Added image on new trick is not set as default #68

Closed Starbugstone closed 5 years ago

Starbugstone commented 5 years ago

When we add an image, the trick should automaticly have the image set as primary

Starbugstone commented 5 years ago

Not actualy working. The problem is not on new creation but if we edit a trick that has no images.

Starbugstone commented 5 years ago

This is actualy the desired functionality. If we edit and don"t have a defined image then don't update. We are editing so if the image is not set then there is a reason. we dont want to overright the previous editors choice.

The case we have here is that there wern't any images to begin with. could fix but that means adding a database call for this perticular case where we have no images before. Could probably work around by sending the before image count to the event or even creating a specific event, but got to get the project out. Setting to wontfix for the moment and will reopen if realy needed.

Starbugstone commented 5 years ago

After reflection, just did an event call after check in the controller. The events are GOOD !! So now, if no images and editing adds an image, we get a new primary image