Skip to content

Commit eaefaaa

Browse files
committed
Update commit for Python SDK
1 parent c62ebaa commit eaefaaa

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

backend/infrahub/core/attribute.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import netaddr
99
import ujson
10-
from infrahub_sdk.timestamp import TimestampFormatError
10+
from infrahub_sdk.exceptions import TimestampFormatError
1111
from infrahub_sdk.utils import is_valid_url
1212
from infrahub_sdk.uuidt import UUIDT
1313
from pydantic import BaseModel, Field

backend/infrahub/core/diff/model/path.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ def __hash__(self) -> int:
418418

419419
@property
420420
def time_range(self) -> TimeDelta:
421-
return self.to_time.obj - self.from_time.obj
421+
return self.to_time.get_obj() - self.from_time.get_obj()
422422

423423
def update_metadata(
424424
self,
@@ -448,7 +448,7 @@ def __hash__(self) -> int:
448448

449449
@property
450450
def time_range(self) -> TimeDelta:
451-
return self.to_time.obj - self.from_time.obj
451+
return self.to_time.get_obj() - self.from_time.get_obj()
452452

453453
def get_nodes_without_parents(self) -> set[EnrichedDiffNode]:
454454
nodes_with_parent_uuids = set()

backend/infrahub/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from fastapi.responses import RedirectResponse
1515
from fastapi.staticfiles import StaticFiles
1616
from fastapi.templating import Jinja2Templates
17-
from infrahub_sdk.timestamp import TimestampFormatError
17+
from infrahub_sdk.exceptions import TimestampFormatError
1818
from opentelemetry.instrumentation.fastapi import FastAPIInstrumentor
1919
from opentelemetry.trace import Span
2020
from pydantic import ValidationError

0 commit comments

Comments
 (0)