Skip to content

Commit

Permalink
Merge pull request #172 from openimis/feature/fix-subscription-typo
Browse files Browse the repository at this point in the history
fix ORM typo
  • Loading branch information
delcroip authored Jan 30, 2024
2 parents 6d1a2d4 + ed24c7d commit 11d2780
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions api_fhir_r4/subscriptions/subscriptionCriteriaFilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ def _get_all_active_subscriptions(self):
R4SubscriptionConfig.get_fhir_sub_criteria_key_resource(): self.fhir_resource_name})
if self.fhir_resource_type_name:
queryset = queryset.filter(
~Q(criteria__jsoncontainskey=R4SubscriptionConfig.get_fhir_sub_criteria_key_resource_type() | Q(
~Q(criteria__jsoncontainskey=R4SubscriptionConfig.get_fhir_sub_criteria_key_resource_type() )| Q(
criteria__jsoncontains={
R4SubscriptionConfig.get_fhir_sub_criteria_key_resource_type(): self.fhir_resource_type_name})))
R4SubscriptionConfig.get_fhir_sub_criteria_key_resource_type(): self.fhir_resource_type_name}))
return queryset.all()

def _get_matching_subscriptions(self, subscriptions):
Expand Down
3 changes: 2 additions & 1 deletion api_fhir_r4/tests/test_api_authorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from api_fhir_r4.configurations import GeneralConfiguration
from api_fhir_r4.tests import GenericFhirAPITestMixin
from gettext import gettext as _

from api_fhir_r4.tests.utils import get_connection_payload,get_or_create_user_api

Expand Down Expand Up @@ -52,7 +53,7 @@ def test_post_should_raise_error_decode_token(self):
response = self.client.get(self.url_to_test_authorization, format='json', **headers)
response_json = response.json()
self.assertEqual(response.status_code, status.HTTP_401_UNAUTHORIZED)
self.assertEqual(self.get_response_details(response_json), "Error decoding signature")
self.assertEqual(self.get_response_details(response_json), _('INCORRECT_CREDENTIALS'))

def test_post_should_raise_lack_of_bearer_prefix(self):
response = self.client.post(self.base_url + 'login/', data=get_connection_payload(), format='json')
Expand Down

0 comments on commit 11d2780

Please sign in to comment.