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:
3939 @property
4040 def extra_condition (self ) -> str :
4141 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 )
4348
4449
4550class AQLMappings (BasePlatformMappings ):
@@ -48,7 +53,7 @@ class AQLMappings(BasePlatformMappings):
4853
4954 def prepare_log_source_signature (self , mapping : dict ) -> AQLLogSourceSignature :
5055 log_source = mapping .get ("log_source" , {})
51- default_log_source = mapping . get ( "default_log_source" )
56+ default_log_source = mapping [ "default_log_source" ]
5257 return AQLLogSourceSignature (
5358 device_types = log_source .get ("devicetype" ),
5459 categories = log_source .get ("category" ),
You can’t perform that action at this time.
0 commit comments