Skip to content

Loading…

Rc11 : required has many cause entry creation fail #500

Closed
gabrielnau opened this Issue · 3 comments

2 participants

@gabrielnau

Hello,

I'm running on Locomotive rc11.
I have the following models :

  • Gallerie
  • Images

Gallerie has many Images, and I want make this as required. I'm used to the fact I first need to create the Gallerie entry to then edit it, and add images. But if the has_many field is set as "required", then I cannot create it.
What's more there is a bug in the flash message : it's red but the text is "Succesfull creation".

I don't see why a has_many relationship should not be "required", is there a reason ? If so, it would be great to disable the ability to set a has_many field as required.

Thanks !

Gabriel

@did
Locomotive member

Hi Gab,

Hmmm, let me take a look at this please. thanks :-)

@did did was assigned
@did did added a commit that referenced this issue
@did did fix a very annoying bug when creating a site in a locale different fr…
…om the one of the current account + add a test to prove that a select type can be embedded in a contact form (issue #739) + new version of the custom_field gems solving 2 issues #500 and #728
7575d4b
@did
Locomotive member
did commented

hey Gab, finally I fixed it ! Here how it works:

  • the "required" property is not applied when you first create an entry which has a has_many field, otherwise, you will expirement the egg/chicken problem.
  • It's only when you update this same entry that we will have to fill the has_many field.

Hope it makes sense for you :-)

@did did closed this
@gabrielnau

Seems great, thanks !

@manuchap manuchap added a commit that referenced this issue
@did did fix a very annoying bug when creating a site in a locale different fr…
…om the one of the current account + add a test to prove that a select type can be embedded in a contact form (issue #739) + new version of the custom_field gems solving 2 issues #500 and #728
b7e8089
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.