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

API allows creating multiple addresses same location type #10510

Merged

Conversation

seamuslee001
Copy link
Contributor

ping @eileenmcnaughton this test passes but is an issue i think, the API is allowing >= 2 addresses of the same location type yet the form layer would block this just thinking should we be limiting the API as per form layer?

@seamuslee001
Copy link
Contributor Author

ping @johntwyman

@eileenmcnaughton eileenmcnaughton merged commit 3c3f4a7 into civicrm:master Jun 15, 2017
@mickadoo
Copy link
Contributor

Just noticed the comment

@todo vis this in v4 api

Wouldn't it be better to fix this at BAO level instead of duplicating validation at form and api level?

@eileenmcnaughton
Copy link
Contributor

Yes, quite possibly!

I'm not quite sure whether we should still permit it for 3 though - since we historically have it seems wrong to change it now. Perhaps the BAO can support both but default to 'replace' for v4

@seamuslee001 seamuslee001 deleted the api_duplicate_location_types branch June 19, 2017 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants