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

25143 - remove product / add previously approved product support #3200

Merged
merged 3 commits into from
Jan 9, 2025

Conversation

ochiu
Copy link
Collaborator

@ochiu ochiu commented Jan 8, 2025

Issue #:
bcgov/entity#25143

Description of changes:

  • Add ability to remove a product and clean up any pending tasks
  • Re-adding a product previously approved will auto approve (no new task is created, will just activate product)
  • New tests to for product removal and re-adding product from various states
  • clean up on orgId format validation on org_products route (moved to function)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the sbc-auth license (Apache 2.0).

@ochiu ochiu force-pushed the 25143-remove-product branch from a7f2a1f to c6ef6e1 Compare January 8, 2025 17:47
Copy link

sonarqubecloud bot commented Jan 8, 2025

@@ -23,6 +23,7 @@
class Error(Enum):
"""Error Codes."""

INVALID_ORG = "The organization ID is in an incorrect format.", HTTPStatus.BAD_REQUEST
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added this consolidate duplicate code in the org_products route for validating orgId format

return response, status


def validate_organization(org_id):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

mini helper added so routes can re-use it

@ochiu ochiu marked this pull request as ready for review January 8, 2025 21:15
Copy link
Collaborator

@seeker25 seeker25 left a comment

Choose a reason for hiding this comment

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

LGTM

@seeker25 seeker25 merged commit 66528fa into bcgov:main Jan 9, 2025
13 of 15 checks passed
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.

3 participants