Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: check if asset id exists before creating a hotspot image #14

Open
wants to merge 1 commit into
base: 6.9
Choose a base branch
from

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
1 participant