Deleted redundant line

This commit is contained in:
Vivek Santayana 2022-08-19 13:24:54 +01:00
parent 1c57950558
commit f4f501def5

View File

@ -58,7 +58,6 @@ class Test(db.Model):
return True, f'Test with code {self.get_code()} has been created.' return True, f'Test with code {self.get_code()} has been created.'
def delete(self): def delete(self):
code = self.code
if self.entries: return False, f'Cannot delete a test with submitted entries.' if self.entries: return False, f'Cannot delete a test with submitted entries.'
db.session.delete(self) db.session.delete(self)
db.session.commit() db.session.commit()