Conversation
* Adds filters for dispense status in Medication Request ViewSet * Add for request summary * add exclude status filter for medication dispense
…3065) * Update inventory item net content filter to allow filtering by range * weird things...
Bumps [djangorestframework](https://github.com/encode/django-rest-framework) from 3.15.2 to 3.16.1. - [Release notes](https://github.com/encode/django-rest-framework/releases) - [Commits](encode/django-rest-framework@3.15.2...3.16.1) --- updated-dependencies: - dependency-name: djangorestframework dependency-version: 3.16.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat:implemented testcases for create healthcare service request * feat:implemented testcases for retrieve healthcare service request * feat:implemented testcases for update healthcare service request * feat:implemented testcases for filtering healthcare service request * feat:added some edge cases --------- Co-authored-by: Aakash Singh <mail@singhaakash.dev>
Bumps [pillow](https://github.com/python-pillow/Pillow) from 11.1.0 to 11.3.0. - [Release notes](https://github.com/python-pillow/Pillow/releases) - [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst) - [Commits](python-pillow/Pillow@11.1.0...11.3.0) --- updated-dependencies: - dependency-name: pillow dependency-version: 11.3.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add location in dispense read spec * Lint fix
Bumps [celery](https://github.com/celery/celery) from 5.4.0 to 5.5.3. - [Release notes](https://github.com/celery/celery/releases) - [Changelog](https://github.com/celery/celery/blob/main/Changelog.rst) - [Commits](celery/celery@v5.4.0...v5.5.3) --- updated-dependencies: - dependency-name: celery dependency-version: 5.5.3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* refact:fixed facility check * removed unwanted facility call
Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 4.0.1 to 4.3.0. - [Release notes](https://github.com/pre-commit/pre-commit/releases) - [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md) - [Commits](pre-commit/pre-commit@v4.0.1...v4.3.0) --- updated-dependencies: - dependency-name: pre-commit dependency-version: 4.3.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat:added test cases for create product knowledge * feat:added testcases for retrieve product knowledge * feat:added update product knowledge testcases * feat:added testcases for listing product knowledge * feat:added testcases for listing product knowledge * feat:added testcases for validation * feat:added slug validation
Bumps [mypy](https://github.com/python/mypy) from 1.14.1 to 1.17.1. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](python/mypy@v1.14.1...v1.17.1) --- updated-dependencies: - dependency-name: mypy dependency-version: 1.17.1 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* using enum choice in resource request * added created date and modified date in service request
* feat:added setup for identifier config * feat:added create testcases for patient identifier * feat:added retrieve testcases for patient identifier * feat:added update testcases for patient identifier * feat:added list testcases for patient identifier * minor change * refact:fixed facility check --------- Co-authored-by: Aakash Singh <mail@singhaakash.dev> Co-authored-by: Prafful Sharma <115104695+praffq@users.noreply.github.com>
* feat:added a helper function for service request * feat: test cases for specimen --------- Co-authored-by: Aakash Singh <mail@singhaakash.dev> Co-authored-by: Prafful Sharma <115104695+praffq@users.noreply.github.com>
Bumps [jsonschema](https://github.com/python-jsonschema/jsonschema) from 4.23.0 to 4.25.1. - [Release notes](https://github.com/python-jsonschema/jsonschema/releases) - [Changelog](https://github.com/python-jsonschema/jsonschema/blob/main/CHANGELOG.rst) - [Commits](python-jsonschema/jsonschema@v4.23.0...v4.25.1) --- updated-dependencies: - dependency-name: jsonschema dependency-version: 4.25.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.11.7 to 0.12.12. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](astral-sh/ruff@0.11.7...0.12.12) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.12.12 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [redis-om](https://github.com/redis/redis-om-python) from 0.3.3 to 0.3.5. - [Release notes](https://github.com/redis/redis-om-python/releases) - [Commits](redis/redis-om-python@v0.3.3...v0.3.5) --- updated-dependencies: - dependency-name: redis-om dependency-version: 0.3.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
| self.get_facility_from_instance(instance), | ||
| ) | ||
| except ValueError as e: | ||
| raise RestFrameworkValidationError(str(e)) from e |
Check warning
Code scanning / CodeQL
Information exposure through an exception Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 year ago
To fix this issue, do not expose the actual content of the caught ValueError to the API consumer. Instead, raise a RestFrameworkValidationError with a safe, generic error message. The original exception e can optionally be logged server-side for troubleshooting if needed. The change should only be made to line 351, within the perform_set_tags method inside the EMRTagMixin class in care/emr/api/viewsets/base.py. No new methods or models are required, but a logging import (import logging) is recommended if server-side logging is desirable—and that logging code should be added right before the safe error message is raised. This ensures the user sees only a generic error and the developer still has diagnostics.
| @@ -348,8 +348,12 @@ | ||
| self.get_facility_from_instance(instance), | ||
| ) | ||
| except ValueError as e: | ||
| raise RestFrameworkValidationError(str(e)) from e | ||
|
|
||
| # Log exception on server side, send generic message to user | ||
| import logging | ||
| logging.exception("Error setting tags") | ||
| raise RestFrameworkValidationError( | ||
| "There was an error processing tags. Please check your request and try again." | ||
| ) from e | ||
| @extend_schema(request=TagRequest) | ||
| @action(detail=True, methods=["POST"]) | ||
| def set_tags(self, request, *args, **kwargs): |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests
Comment |
Proposed Changes
Associated Issue
Architecture changes
Merge Checklist
/docsOnly PR's with test cases included and passing lint and test pipelines will be reviewed
@ohcnetwork/care-backend-maintainers @ohcnetwork/care-backend-admins