Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 8df9b01

Browse files
committed
Apply patch GoogleCloudPlatform#94 manually
It looks like the mapreduce code doesn't properly validate filters of list properties. I don't know if this fix is right, but we can try it! Implements GoogleCloudPlatform#94 Test plan: Fingers crossed Auditors: benkraft
1 parent 6855464 commit 8df9b01

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

python/src/mapreduce/input_readers.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,12 @@ def _validate_filters(cls, filters, model_class):
670670
"Property %s is not defined for entity type %s",
671671
prop, model_class.kind())
672672

673-
# Validate the value of each filter. We need to know filters have
673+
if isinstance(properties[prop], db.ListProperty):
674+
# for db.ListProperty validate expect a list, but filter expect
675+
# a single value
676+
val = [val]
677+
678+
# Validate the value of each filter. We need to know filters have
674679
# valid value to carry out splits.
675680
try:
676681
properties[prop].validate(val)

0 commit comments

Comments
 (0)