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 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)

View File

@ -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,