Skip to content

Commit 6a5340b

Browse files
authored
Merge branch 'dev' into wangbill/blob-len
2 parents 770af0e + 7683200 commit 6a5340b

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

azure/functions/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,4 @@
102102
'BlobSource'
103103
)
104104

105-
__version__ = '1.22.0b2'
105+
__version__ = '1.22.0b3'

azure/functions/decorators/blob.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ def __init__(self,
1717
**kwargs):
1818
self.path = path
1919
self.connection = connection
20-
self.source = source.value if source else None
20+
if isinstance(source, BlobSource):
21+
self.source = source.value
22+
else:
23+
self.source = source # type: ignore
2124
super().__init__(name=name, data_type=data_type)
2225

2326
@staticmethod

tests/decorators/test_blob.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def test_blob_trigger_creation_with_source_as_string(self):
5050
trigger = BlobTrigger(name="req",
5151
path="dummy_path",
5252
connection="dummy_connection",
53-
source=BlobSource.EVENT_GRID,
53+
source="EventGrid",
5454
data_type=DataType.UNDEFINED,
5555
dummy_field="dummy")
5656

0 commit comments

Comments
 (0)