File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
uncoder-core/app/translator/platforms/base/aql Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,12 @@ def __str__(self) -> str:
39
39
@property
40
40
def extra_condition (self ) -> str :
41
41
default_source = self ._default_source
42
- return " AND " .join ((f"{ key } ={ value } " for key , value in default_source .items () if key != "table" and value ))
42
+ extra = []
43
+ for key , value in default_source .items ():
44
+ if key != "table" and value :
45
+ _condition = f"{ key } ={ value } " if isinstance (value , int ) else f"{ key } ='{ value } '"
46
+ extra .append (_condition )
47
+ return " AND " .join (extra )
43
48
44
49
45
50
class AQLMappings (BasePlatformMappings ):
@@ -48,7 +53,7 @@ class AQLMappings(BasePlatformMappings):
48
53
49
54
def prepare_log_source_signature (self , mapping : dict ) -> AQLLogSourceSignature :
50
55
log_source = mapping .get ("log_source" , {})
51
- default_log_source = mapping . get ( "default_log_source" )
56
+ default_log_source = mapping [ "default_log_source" ]
52
57
return AQLLogSourceSignature (
53
58
device_types = log_source .get ("devicetype" ),
54
59
categories = log_source .get ("category" ),
You can’t perform that action at this time.
0 commit comments