Skip to content

Commit

Permalink
fix the weird bug
Browse files Browse the repository at this point in the history
  • Loading branch information
MehmedGIT committed Feb 17, 2024
1 parent 588b017 commit 540f4d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ocrd_network/processing_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,14 +458,14 @@ def validate_agent_type_and_existence(self, processor_name: str, agent_type: Age
raise_http_exception(self.log, status.HTTP_422_UNPROCESSABLE_ENTITY, message)

async def push_processor_job(self, processor_name: str, data: PYJobInput) -> PYJobOutput:
# Append the processor name to the request itself
data.processor_name = processor_name
self.validate_agent_type_and_existence(processor_name=data.processor_name, agent_type=data.agent_type)
if data.job_id:
message = f"Processing request job id field is set but must not be: {data.job_id}"
raise_http_exception(self.log, status.HTTP_422_UNPROCESSABLE_ENTITY, message)
# Generate processing job id
data.job_id = generate_id()
# Append the processor name to the request itself
data.processor_name = processor_name
ocrd_tool = await self.get_processing_agent_ocrd_tool(
processor_name=data.processor_name,
agent_type=data.agent_type
Expand Down

0 comments on commit 540f4d7

Please sign in to comment.