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

Bugfix: Add duplicate organization name check #209

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

Conversation

NenadPantelic
Copy link
Contributor

Description

Added handling of the situation when the user tries to create the new organization with the name of some other persisted organization. Fixes #110.

Type of Change:

  • Code

Code/Quality Assurance Only

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  1. Tested through Swagger UI:
    image
  2. Added unit test to cover this scenario

Checklist:

  • My PR follows the style guidelines of this project
  • I have performed a self-review of my own code or materials
  • I have commented my code or provided relevant documentation, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • Any dependent changes have been merged

Code/Quality Assurance Only

  • My changes generate no new warnings
  • My PR currently breaks something (fix or feature that would cause existing functionality to not work as expected)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been published in downstream modules

@NenadPantelic
Copy link
Contributor Author

@mtreacy002 I solved the organization name conflict too (this time it is an organization, not a program 😂 ). I expect to face merge conflicts after #189 is merged (they tackle the same files).

@mtreacy002 mtreacy002 added Category: Coding Changes to code base or refactored code that doesn't fix a bug. Status: Needs Review PR needs an additional review or a maintainer's review. Type: Enhancement New feature or request. Type: Bug Bug or Bug fixes. and removed Type: Enhancement New feature or request. labels Mar 9, 2021
Copy link
Member

@mtreacy002 mtreacy002 left a comment

Choose a reason for hiding this comment

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

@NenadPantelic , well done with the fix. I've tested this and it works. But can you please just make one minor change below. After that I'll write the test report and approve. Thanks

follow_redirects=True,
content_type="application/json",
)
self.assertEqual(HTTPStatus.CREATED, response.status_code)
self.assertEqual(messages.ORGANIZATION_SUCCESSFULLY_CREATED, json.loads(response.data))

def test_api_dao_create_organization_when_name_not_unique(self):
Copy link
Member

Choose a reason for hiding this comment

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

@NenadPantelic perhaps rename this to "...._when_name_already_exist" to avoid ambiguity coz organization name is unique.

@mtreacy002 mtreacy002 added Status: Changes Requested Changes are required to be done by the PR author. and removed Status: Needs Review PR needs an additional review or a maintainer's review. labels Mar 13, 2021
@mtreacy002
Copy link
Member

@NenadPantelic , can you please give us update on this?

@NenadPantelic
Copy link
Contributor Author

Sorry for the delay, I'm busy with other things. I can update this in the next two or three days. Is that OK? The same goes for #189

@mtreacy002
Copy link
Member

mtreacy002 commented Apr 5, 2021

Sure, @NenadPantelic. Thanks for responding. Will look forward to the update. Don't forget to resolve the conflict while you're at it 😉.

@mtreacy002
Copy link
Member

@NenadPantelic , can we please get the updates on this?

@devkapilbansal
Copy link
Member

Hi @NenadPantelic are you still working on this?

Copy link
Member

@vj-codes vj-codes left a comment

Choose a reason for hiding this comment

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

@NenadPantelic hey any updates about this? Please resolve the merge conflicts as well. Thanks!

@NenadPantelic
Copy link
Contributor Author

Hey, I have been busy for the past few months. I'll do my best to finish this up or to close the MR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Coding Changes to code base or refactored code that doesn't fix a bug. Status: Changes Requested Changes are required to be done by the PR author. Type: Bug Bug or Bug fixes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Creation of duplicate organizations throws error
4 participants