@@ -26,21 +26,22 @@ def get_type(self, obj):
26
26
"name" : "Custom" ,
27
27
}
28
28
29
- def _get_config (self , obj ):
30
- return obj .config or {}
31
-
32
29
def get_pipeline (self , obj ):
33
- return self ._get_config (obj = obj ).get ("pipeline" , None )
30
+ config = obj .config or {}
31
+ return config .get ("pipeline" , None )
34
32
35
33
def get_refresh_interval (self , obj ):
36
- return self ._get_config (obj = obj ).get ("refresh_interval" , None )
34
+ config = obj .config or {}
35
+ return config .get ("refresh_interval" , None )
37
36
38
37
def get_has_source (self , obj ):
39
- return self ._get_config (obj = obj ).get ("pipeline" , {}).get ("source" , {}).get ("slug" , None ) is not None
38
+ config = obj .config or {}
39
+ return config .get ("pipeline" , {}).get ("source" , {}).get ("slug" , None ) is not None
40
40
41
41
def get_is_destination_only (self , obj ):
42
+ config = obj .config or {}
42
43
return (
43
- self . _get_config ( obj = obj ) .get ("pipeline" , {}).get ("destination" , {}).get ("slug" , None ) is not None
44
+ config .get ("pipeline" , {}).get ("destination" , {}).get ("slug" , None ) is not None
44
45
and self .get_has_source (obj ) is False
45
46
)
46
47
0 commit comments