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

throw error if heritage name already exits #659

Merged
merged 1 commit into from
Mar 15, 2021

Conversation

Yuuki77
Copy link
Contributor

@Yuuki77 Yuuki77 commented Mar 9, 2021

Part of #617

Currently you can do

If you have district A and district B, it is possible to go

bcn create -e prod -d A

and then go

bcn create -e prod -d B

For now we need to prevent heritages of the same name created from being created.

Note

Originally, I tried to do this inside BuildHeritage class, but the BuildHeritage class is also used in the reviewApp, and is used in both the create and find. So, I decided to handle it in the controller.

@Yuuki77 Yuuki77 force-pushed the validation-if-name-exits branch from cf83872 to 2882ee6 Compare March 10, 2021 06:10
@Yuuki77 Yuuki77 linked an issue Mar 10, 2021 that may be closed by this pull request
@degicat degicat requested a review from davidsiaw March 10, 2021 06:20
@degicat
Copy link

degicat commented Mar 10, 2021

@davidsiaw please review this

@davidsiaw
Copy link
Contributor

Hmm. I think people should be allowed to create another heritage with the same heritage name in a different district. Is there a way to accommodate this?

Copy link
Contributor

@davidsiaw davidsiaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. This is a good temporary solution but I think we should seek a permanent solution in the meantime!

@davidsiaw davidsiaw merged commit 6d36a83 into master Mar 15, 2021
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.

You can mis-deploy a heritage into the wrong district
3 participants