add sid instead of wbid in schema action snapshot

This commit is contained in:
Cayo Puigdefabregas 2022-04-25 11:53:27 +02:00
parent 7b784b6174
commit a362c8644b
2 changed files with 5 additions and 3 deletions

View File

@ -17,12 +17,12 @@ from datetime import datetime, timedelta, timezone
from decimal import ROUND_HALF_EVEN, ROUND_UP, Decimal from decimal import ROUND_HALF_EVEN, ROUND_UP, Decimal
from typing import Optional, Set, Union from typing import Optional, Set, Union
from uuid import uuid4 from uuid import uuid4
from dateutil.tz import tzutc
import inflection import inflection
import teal.db import teal.db
from boltons import urlutils from boltons import urlutils
from citext import CIText from citext import CIText
from dateutil.tz import tzutc
from flask import current_app as app from flask import current_app as app
from flask import g from flask import g
from sortedcontainers import SortedSet from sortedcontainers import SortedSet
@ -274,7 +274,9 @@ class Action(Thing):
super().__init__(**kwargs) super().__init__(**kwargs)
def __lt__(self, other): 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: def __str__(self) -> str:
return '{}'.format(self.severity) return '{}'.format(self.severity)

View File

@ -425,7 +425,7 @@ class Snapshot(ActionWithOneDevice):
See docs for more info. See docs for more info.
""" """
uuid = UUID() uuid = UUID()
wbid = String(required=False) sid = String(required=False)
software = EnumField( software = EnumField(
SnapshotSoftware, SnapshotSoftware,
required=True, required=True,