yes-man-today commited on
Commit
f87e30b
1 Parent(s): ff81fc0
Files changed (1) hide show
  1. regulatory_comments_api.py +1 -2
regulatory_comments_api.py CHANGED
@@ -118,8 +118,7 @@ class RegulationsDataFetcher:
118
  comment_data = comment_details['data']['attributes']
119
  comment_text = (comment_data.get('comment', '') or '').strip()
120
 
121
- # Data cleaning: check for non-empty text, absence of "see attachment", and text not being "N/A"
122
- if (comment_text and "see attachment" not in comment_text.lower() and comment_text.lower() != "n/a"):
123
  # Replace empty commenter_fname with "Anonymous"
124
  nested_comment = {
125
  "text": comment_text,
 
118
  comment_data = comment_details['data']['attributes']
119
  comment_text = (comment_data.get('comment', '') or '').strip()
120
 
121
+ if (comment_text and "attached" not in comment_text.lower() and "attachment" not in comment_text.lower() and comment_text.lower() != "n/a"):
 
122
  # Replace empty commenter_fname with "Anonymous"
123
  nested_comment = {
124
  "text": comment_text,