From a362c8644b8d964758a8fe1be8451c054c6e2e96 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 25 Apr 2022 11:53:27 +0200 Subject: [PATCH] add sid instead of wbid in schema action snapshot --- ereuse_devicehub/resources/action/models.py | 6 ++++-- ereuse_devicehub/resources/action/schemas.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ereuse_devicehub/resources/action/models.py b/ereuse_devicehub/resources/action/models.py index 0e6decce..c0876598 100644 --- a/ereuse_devicehub/resources/action/models.py +++ b/ereuse_devicehub/resources/action/models.py @@ -17,12 +17,12 @@ from datetime import datetime, timedelta, timezone from decimal import ROUND_HALF_EVEN, ROUND_UP, Decimal from typing import Optional, Set, Union from uuid import uuid4 -from dateutil.tz import tzutc import inflection import teal.db from boltons import urlutils from citext import CIText +from dateutil.tz import tzutc from flask import current_app as app from flask import g from sortedcontainers import SortedSet @@ -274,7 +274,9 @@ class Action(Thing): super().__init__(**kwargs) def __lt__(self, other): - return self.end_time.replace(tzinfo=tzutc()) < other.end_time.replace(tzinfo=tzutc()) + return self.end_time.replace(tzinfo=tzutc()) < other.end_time.replace( + tzinfo=tzutc() + ) def __str__(self) -> str: return '{}'.format(self.severity) diff --git a/ereuse_devicehub/resources/action/schemas.py b/ereuse_devicehub/resources/action/schemas.py index 5c8f2d5f..9dadab2c 100644 --- a/ereuse_devicehub/resources/action/schemas.py +++ b/ereuse_devicehub/resources/action/schemas.py @@ -425,7 +425,7 @@ class Snapshot(ActionWithOneDevice): See docs for more info. """ uuid = UUID() - wbid = String(required=False) + sid = String(required=False) software = EnumField( SnapshotSoftware, required=True,