Skip to content

Commit fb56d45

Browse files
committed
removing unecessary parsing step
Signed-off-by: Fernando Rocha <[email protected]>
1 parent 3a0a992 commit fb56d45

File tree

1 file changed

+1
-7
lines changed
  • jobs/python/http/job-service

1 file changed

+1
-7
lines changed

jobs/python/http/job-service/app.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,7 @@ def do_POST(self):
3737
raw_data = self.rfile.read(content_length).decode('utf-8')
3838

3939
# Parse outer JSON data
40-
outer_data = json.loads(raw_data)
41-
42-
# The payload might be double-encoded, so try parsing again if it's a string
43-
if isinstance(outer_data, str):
44-
job_data = json.loads(outer_data)
45-
else:
46-
job_data = outer_data
40+
job_data = json.loads(raw_data)
4741

4842
# Extract value directly from the job data
4943
value = job_data.get('value', '')

0 commit comments

Comments
 (0)