Bug fixing for new AddEdit forms.

This commit is contained in:
lwark
2025-01-08 13:54:14 -06:00
parent 8662bbdc2f
commit 95ae203cc2
11 changed files with 217 additions and 85 deletions

View File

@@ -286,6 +286,10 @@ class Control(BaseClass):
"""
return None
def delete(self):
self.__database_session__.delete(self)
self.__database_session__.commit()
class PCRControl(Control):
"""
@@ -296,7 +300,7 @@ class PCRControl(Control):
subtype = Column(String(16)) #: PC or NC
target = Column(String(16)) #: N1, N2, etc.
ct = Column(FLOAT) #: PCR result
reagent_lot = Column(String(64), ForeignKey("_reagent.name", ondelete="SET NULL",
reagent_lot = Column(String(64), ForeignKey("_reagent.lot", ondelete="SET NULL",
name="fk_reagent_lot"))
reagent = relationship("Reagent", foreign_keys=reagent_lot) #: reagent used for this control