one liner

This commit is contained in:
IVIURRAY 2019-06-27 20:13:36 +01:00
parent 4ce0e6bbcb
commit cd666758f6

View File

@ -985,8 +985,7 @@ class DynamoDBBackend(BaseBackend):
else:
filter_expression = Op(None, None) # Will always eval to true
projection_expression = ','.join([expr_names[attr] if attr in expr_names else attr
for attr in projection_expression.replace(' ', '').split(',')])
projection_expression = ','.join([expr_names.get(attr, attr) for attr in projection_expression.replace(' ', '').split(',')])
return table.scan(scan_filters, limit, exclusive_start_key, filter_expression, index_name, projection_expression)