code to call recorder functions from frointend
This commit is contained in:
@@ -8,6 +8,7 @@ import json
|
||||
import pkgutil
|
||||
import os
|
||||
import re
|
||||
from typing import Union
|
||||
|
||||
from sqlalchemy import MetaData
|
||||
from sqlalchemy.exc import IntegrityError
|
||||
@@ -234,8 +235,12 @@ class RecorderCommand(db.Model, ModelBase):
|
||||
def get_all():
|
||||
return RecorderCommand.query.all()
|
||||
|
||||
@staticmethod
|
||||
def get_by_identifier(identifier):
|
||||
return RecorderCommand.query.filter(RecorderCommand.id == identifier).first()
|
||||
|
||||
@property
|
||||
def parameters(self):
|
||||
def parameters(self) -> Union[dict, None]:
|
||||
if self.parameters_string is None:
|
||||
return None
|
||||
return json.loads(self.parameters_string)
|
||||
|
||||
Reference in New Issue
Block a user