Skip to content

Commit

Permalink
changed to list field for authorizing org; function updated for entry…
Browse files Browse the repository at this point in the history
… classification in mockserver;
  • Loading branch information
ranjan-stha committed Dec 4, 2023
1 parent 4abc431 commit ac5b56b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions analysis_module/mockserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,13 +363,13 @@ def process_entry_extraction_mock(body) -> Any:
logger.error("Could not send data to callback url", exc_info=True)

def entry_classification_mock(body) -> Any:
process_entry_extraction_mock.apply_async(
process_entry_classification_mock.apply_async(
args=(body,), countdown=2
) # Trigger task after 2 seconds
return json.dumps({"status": "Successfully received the request."}), 200

@shared_task
def process_entry_extraction_mock(body) -> Any:
def process_entry_classification_mock(body) -> Any:
callback_payload = MOCK_ENTRY_CLASSIFICATION
callback_payload.update({
"client_id": body["entries"][0]["client_id"]
Expand Down
2 changes: 1 addition & 1 deletion analysis_module/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class PredictionEntrySerializer(serializers.Serializer):
class PredictionRequestSerializer(serializers.Serializer):
entries = PredictionEntrySerializer(many=True)
publishing_organization = serializers.CharField()
authoring_organization = serializers.CharField()
authoring_organization = serializers.ListField()
callback_url = serializers.CharField()
mock = serializers.BooleanField(default=False)

Expand Down

0 comments on commit ac5b56b

Please sign in to comment.