Deleted redundant line
This commit is contained in:
parent
1c57950558
commit
f4f501def5
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user