Skip to content

Conversation

zoidbergx
Copy link
Member

Changes in this pull request

check asset id before creating a hotspot image object when getting data from edit mode

Additional info

If a hotpsot image is saved without an asset the function getDataFromEditMode returns a new object even no id from asset is set. This could bypass a validation check as a new object is created.

I added the same check as in the Image class

HOW

  • create a fieldcollection with an advanced image type and set the image as mandatory
  • add the fieldcollection to any object
  • create a new object
  • add a fieldcollection entry but without adding an asset reference
  • save and publish the object
  • the mandatory check is bypassed as the current code returns a new object even without an asset assigned

zoidbergx pushed a commit that referenced this pull request Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant