Skip to content

Commit 109c078

Browse files
committed
changed order
1 parent b8c59f4 commit 109c078

File tree

1 file changed

+5
-3
lines changed
  • azure_functions_worker/bindings

1 file changed

+5
-3
lines changed

azure_functions_worker/bindings/meta.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def get_binding(bind_name: str, pytype: typing.Optional[type] = None) -> object:
4646
# Check if binding is deferred binding
4747
binding = get_deferred_binding(bind_name=bind_name, pytype=pytype)
4848
# Binding is not deferred binding type
49-
if BINDING_REGISTRY is not None and binding is None:
49+
if binding is None and BINDING_REGISTRY is not None:
5050
binding = BINDING_REGISTRY.get(bind_name)
5151
# Binding is generic
5252
if binding is None:
@@ -216,9 +216,11 @@ def get_deferred_binding(bind_name: str,
216216
pytype: typing.Optional[type] = None) -> object:
217217
binding = None
218218

219+
if DEFERRED_BINDINGS_REGISTRY is None:
220+
global DEFERRED_BINDINGS_ENABLED
221+
DEFERRED_BINDINGS_ENABLED = False
219222
# Checks if pytype is a supported sdk type
220-
if (DEFERRED_BINDINGS_REGISTRY is not None
221-
and DEFERRED_BINDINGS_REGISTRY.check_supported_type(pytype)):
223+
elif DEFERRED_BINDINGS_REGISTRY.check_supported_type(pytype):
222224
# Returns deferred binding converter
223225
binding = DEFERRED_BINDINGS_REGISTRY.get(bind_name)
224226

0 commit comments

Comments
 (0)