FIX #17206: Dynaomodb pagination type fix (#17226)

This commit is contained in:
Mayur Singal 2024-07-30 10:39:20 +05:30 committed by GitHub
parent e9f66e26b4
commit a39b59b6b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -84,8 +84,8 @@ class DynamodbSource(CommonNoSQLSource):
Method to get actual data available within table Method to get actual data available within table
need to be overridden by sources need to be overridden by sources
""" """
attributes = []
try: try:
attributes = []
scan_kwargs = {} scan_kwargs = {}
done = False done = False
start_key = None start_key = None
@ -103,7 +103,7 @@ class DynamodbSource(CommonNoSQLSource):
logger.warning( logger.warning(
f"Failed to read DynamoDB attributes for [{table_name}]: {err}" f"Failed to read DynamoDB attributes for [{table_name}]: {err}"
) )
return [] return attributes
def get_source_url( def get_source_url(
self, self,

View File

@ -11,7 +11,7 @@
""" """
DynamoDB Models DynamoDB Models
""" """
from typing import Dict, List, Optional from typing import Any, Dict, List, Optional
from pydantic import BaseModel from pydantic import BaseModel
@ -22,4 +22,4 @@ class TableResponse(BaseModel):
""" """
Items: Optional[List[Dict]] = [] Items: Optional[List[Dict]] = []
LastEvaluatedKey: Optional[str] = None LastEvaluatedKey: Optional[Any] = None