OxbridgeEconomics commited on
Commit
d038be7
·
1 Parent(s): 6c8a470
Files changed (1) hide show
  1. utils.py +1 -3
utils.py CHANGED
@@ -195,7 +195,6 @@ def upsert_content(report):
195
  'site': report['site'],
196
  'title': report['title'],
197
  'titleCN': report['titleCN'],
198
- 'site': report['site'],
199
  'contentCN': report['contentCN'],
200
  'category': report['category'],
201
  'author': report['author'],
@@ -241,11 +240,10 @@ def update_content(report):
241
  'id': {'S': report['id']},
242
  'site': {'S': report['site']}
243
  },
244
- UpdateExpression='SET sentimentScore = :sentimentScore, sentimentLabel = :sentimentLabel',
245
  ExpressionAttributeValues={
246
  'title': report['title'],
247
  'titleCN': report['titleCN'],
248
- 'site': report['site'],
249
  'contentCN': report['contentCN'],
250
  'category': report['category'],
251
  'author': report['author'],
 
195
  'site': report['site'],
196
  'title': report['title'],
197
  'titleCN': report['titleCN'],
 
198
  'contentCN': report['contentCN'],
199
  'category': report['category'],
200
  'author': report['author'],
 
240
  'id': {'S': report['id']},
241
  'site': {'S': report['site']}
242
  },
243
+ UpdateExpression='SET title = :title, titleCN = :titleCN, contentCN = :contentCN, category = :category, author = :author, content = :content, subtitle = :subtitle, publishDate = :publishDate, link = :link, attachment = :attachment, sentimentScore = :sentimentScore, sentimentLabel = :sentimentLabel',
244
  ExpressionAttributeValues={
245
  'title': report['title'],
246
  'titleCN': report['titleCN'],
 
247
  'contentCN': report['contentCN'],
248
  'category': report['category'],
249
  'author': report['author'],