Skip to content

Commit ae3e840

Browse files
committed
fix
1 parent 8ef36aa commit ae3e840

File tree

1 file changed

+7
-2
lines changed
  • uncoder-core/app/translator/platforms/base/aql

1 file changed

+7
-2
lines changed

uncoder-core/app/translator/platforms/base/aql/mapping.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff 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

4550
class 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"),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy