models: remove cyclic import
This commit is contained in:
parent
d6b1273cce
commit
293d83cc1c
1 changed files with 0 additions and 6 deletions
|
@ -3,10 +3,8 @@ from abc import abstractmethod
|
|||
from datetime import datetime
|
||||
from typing import Union, List, Optional, Any
|
||||
|
||||
from app.alarms import alarms_for
|
||||
from app.brm.brn import BRN
|
||||
from app.extensions import db
|
||||
from app.models.alarms import Alarm
|
||||
|
||||
|
||||
class AbstractConfiguration(db.Model): # type: ignore
|
||||
|
@ -18,10 +16,6 @@ class AbstractConfiguration(db.Model): # type: ignore
|
|||
updated = db.Column(db.DateTime(), default=datetime.utcnow, nullable=False)
|
||||
destroyed = db.Column(db.DateTime(), nullable=True)
|
||||
|
||||
@property
|
||||
def alarms(self) -> List[Alarm]:
|
||||
return alarms_for(self.brn)
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def brn(self) -> BRN:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue