lint: various non-semantic fixes
bumping fail-under for pylint to 9.72
This commit is contained in:
parent
7a54e4ea96
commit
f6452cb4fa
14 changed files with 47 additions and 29 deletions
|
@ -1,6 +1,7 @@
|
|||
from datetime import datetime
|
||||
from typing import List
|
||||
|
||||
from app.brm.brn import BRN
|
||||
from app.extensions import db
|
||||
from app.models import AbstractConfiguration, AbstractResource
|
||||
|
||||
|
@ -15,6 +16,16 @@ class BridgeConf(AbstractConfiguration):
|
|||
group = db.relationship("Group", back_populates="bridgeconfs")
|
||||
bridges = db.relationship("Bridge", back_populates="conf")
|
||||
|
||||
@property
|
||||
def brn(self) -> BRN:
|
||||
return BRN(
|
||||
group_id=self.group_id,
|
||||
product="bridge",
|
||||
provider="",
|
||||
resource_type="bridgeconf",
|
||||
resource_id=str(self.id)
|
||||
)
|
||||
|
||||
def destroy(self) -> None:
|
||||
self.destroyed = datetime.utcnow()
|
||||
self.updated = datetime.utcnow()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue