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

Better validation on Intergers / ID #111

Open
xrow opened this issue Mar 16, 2017 · 3 comments
Open

Better validation on Intergers / ID #111

xrow opened this issue Mar 16, 2017 · 3 comments

Comments

@xrow
Copy link
Contributor

xrow commented Mar 16, 2017

Hi,

we noticed that we had looping or nerver ending scripts runs due formetting error. A little input validation would be beneficial.

works:
`

mode: update

type: location
match:
    parent_location_id: 297266 #297266 /Blogs/Markenschau/Marken
parent_location_id: 102 # /Marketing
sort_order: DESC

doesnt work:
`-
mode: update

type: location
match:
    parent_location_id: 297266 #297266 /Blogs/Markenschau/Marken
parent_location_id: 102 /Marketing
sort_order: DESC

`

@gggeek
Copy link
Member

gggeek commented Apr 4, 2017

Note that we can only validate content/location ids to be positive integers values when setting them.
When using them for matching, the code tries to be smart and in many places will treat a string value as remote_(content/location)_id.

Apart from that, ok.

Unless we think that in the future the eZ APi might allow non-integer IDs...

@gggeek
Copy link
Member

gggeek commented Oct 30, 2020

Update: it seems that eZPlatform API is being tightened to only accept integers for Id fields. Will have to check how this impacts the migration bundle - it will probably have an effect on this request...

@gggeek
Copy link
Member

gggeek commented Oct 30, 2020

ps: going forward you will be able to use expect: one or expect: many when you want to make sure that your update/delete migrations do act on a item (it's already in master, to be released as 5.13)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants