Skip to content

Commit

Permalink
feat: make seko event Omnicode take precedence over default Code
Browse files Browse the repository at this point in the history
  • Loading branch information
danh91 committed Dec 18, 2024
1 parent 2fd78d7 commit 1b9e525
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion modules/connectors/seko/karrio/providers/seko/tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def _extract_details(
try_formats=["%Y-%m-%dT%H:%M:%S.%f", "%Y-%m-%dT%H:%M:%S"],
),
description=event.Description,
code=event.Code or event.OmniCode,
code=event.OmniCode or event.Code,
time=lib.flocaltime(
event.EventDT,
try_formats=["%Y-%m-%dT%H:%M:%S.%f", "%Y-%m-%dT%H:%M:%S"],
Expand Down
8 changes: 4 additions & 4 deletions modules/connectors/seko/tests/seko/test_tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def test_parse_tracking_response_multiple(self):
"delivered": False,
"events": [
{
"code": "AAY",
"code": "OP-1",
"date": "2024-10-25",
"description": "Pre-advice received",
"time": "11:28 AM",
Expand All @@ -146,7 +146,7 @@ def test_parse_tracking_response_multiple(self):
"delivered": False,
"events": [
{
"code": "AAY",
"code": "OP-1",
"date": "2024-10-25",
"description": "Pre-advice received",
"time": "11:56 AM",
Expand All @@ -168,7 +168,7 @@ def test_parse_tracking_response_multiple(self):
"delivered": False,
"events": [
{
"code": "AAY",
"code": "OP-1",
"date": "2024-10-25",
"description": "Pre-advice received",
"time": "11:57 AM",
Expand All @@ -190,7 +190,7 @@ def test_parse_tracking_response_multiple(self):
"delivered": False,
"events": [
{
"code": "AAY",
"code": "OP-1",
"date": "2024-10-25",
"description": "Pre-advice received",
"time": "12:02 PM",
Expand Down

0 comments on commit 1b9e525

Please sign in to comment.