remove org_id, fix error
This commit is contained in:
@@ -59,18 +59,16 @@ class MachineBase(Document):
|
|||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def get_config(self, org_id: ObjectId, testname: LabtestsEnum):
|
def get_config(self, testname: LabtestsEnum):
|
||||||
test_id = Labtest.objects(org_id=org_id, test=testname).first()
|
test_id = Labtest.objects(org_id=self.org_id, test=testname).first()
|
||||||
|
|
||||||
if not test_id:
|
if not test_id:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
test_id = test_id.id
|
test_id = test_id.id
|
||||||
|
|
||||||
machine_data = self.objects(tests__test=test_id).only('tests').first()
|
|
||||||
|
|
||||||
config_array = []
|
config_array = []
|
||||||
for test in machine_data.tests:
|
for test in self.tests:
|
||||||
if test.test.id == test_id:
|
if test.test.id == test_id:
|
||||||
config_array = test.config
|
config_array = test.config
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user