Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if opcs:
code = opcs[-1]['chapter']
new_ent['OPCS Code'] = code
a['entities'][i] = new_ent
doc_json = json.dumps(a)
uploaded_text = UploadedText()
uploaded_text.text = str(text)
uploaded_text.save()
return doc2html(doc), doc_json