Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion azure/functions/decorators/blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ def __init__(self,
**kwargs):
self.path = path
self.connection = connection
self.source = source.value if source else None
if type(source) is BlobSource:
self.source = source.value if source else None
else:
self.source = source
super().__init__(name=name, data_type=data_type)

@staticmethod
Expand Down
2 changes: 1 addition & 1 deletion tests/decorators/test_blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def test_blob_trigger_creation_with_source_as_string(self):
trigger = BlobTrigger(name="req",
path="dummy_path",
connection="dummy_connection",
source=BlobSource.EVENT_GRID,
source="EventGrid",
data_type=DataType.UNDEFINED,
dummy_field="dummy")

Expand Down
Loading