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