Skip to content

Commit 5d99664

Browse files
authored
fix bug in Timestamp.add (#403)
* fix bug in Timestamp.add * fix .subtract too
1 parent 380e573 commit 5d99664

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

infrahub_sdk/timestamp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def add(
153153
nanoseconds: int = 0,
154154
disambiguate: Literal["compatible"] = "compatible",
155155
) -> Timestamp:
156-
return Timestamp(
156+
return self.__class__(
157157
self._obj.add(
158158
years=years,
159159
months=months,
@@ -183,7 +183,7 @@ def subtract(
183183
nanoseconds: int = 0,
184184
disambiguate: Literal["compatible"] = "compatible",
185185
) -> Timestamp:
186-
return Timestamp(
186+
return self.__class__(
187187
self._obj.subtract(
188188
years=years,
189189
months=months,

0 commit comments

Comments
 (0)