Fix table name casing in update_content function for DynamoDB
Browse files- controllers/utils.py +2 -2
controllers/utils.py
CHANGED
@@ -224,7 +224,7 @@ def get_client_connection():
|
|
224 |
|
225 |
def update_content(report):
|
226 |
"""
|
227 |
-
Updates the content of an article in the '
|
228 |
|
229 |
Args:
|
230 |
report (dict): A dictionary containing the report data.
|
@@ -235,7 +235,7 @@ def update_content(report):
|
|
235 |
print("Updating content for %s", report['id'])
|
236 |
dynamodb = get_client_connection()
|
237 |
dynamodb.update_item(
|
238 |
-
TableName="
|
239 |
Key={
|
240 |
'id': {
|
241 |
'S': str(report['id'])
|
|
|
224 |
|
225 |
def update_content(report):
|
226 |
"""
|
227 |
+
Updates the content of an article in the 'Article_China' table in DynamoDB.
|
228 |
|
229 |
Args:
|
230 |
report (dict): A dictionary containing the report data.
|
|
|
235 |
print("Updating content for %s", report['id'])
|
236 |
dynamodb = get_client_connection()
|
237 |
dynamodb.update_item(
|
238 |
+
TableName="Article_China",
|
239 |
Key={
|
240 |
'id': {
|
241 |
'S': str(report['id'])
|