From 79f39fea64e1454913ac837429019bf59528f92c Mon Sep 17 00:00:00 2001 From: hinakhadim Date: Thu, 14 Dec 2023 12:43:15 +0500 Subject: [PATCH] fix: NoneType attribute has no replace issue --- cms/djangoapps/contentstore/utils.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cms/djangoapps/contentstore/utils.py b/cms/djangoapps/contentstore/utils.py index 5ec5d6c91798..abe4fc5ec3f1 100644 --- a/cms/djangoapps/contentstore/utils.py +++ b/cms/djangoapps/contentstore/utils.py @@ -734,6 +734,7 @@ def translation_language(language): def replace_script_tags(string): - string = string.replace('', '') - return string \ No newline at end of file + if type(string) == str: + string = string.replace('', '') + return string