Skip to content
Snippets Groups Projects
Commit 5338983d authored by Jiří Setnička's avatar Jiří Setnička Committed by Martin Mareš
Browse files

db.ScanPages pomocné metody

parent 48f6ec6e
No related branches found
No related tags found
1 merge request!94Třídění skenů
This commit is part of merge request !94. Comments created here will be created in the context of that merge request.
......@@ -835,6 +835,12 @@ class ScanPage(Base):
user = relationship('User')
task = relationship('Task')
def is_empty(self) -> bool:
return self.seq_id == SCAN_PAGE_EMPTY and self.user_id is None and self.task_id is None
def is_ok(self) -> bool:
return self.user_id is not None and self.user_id > 0 and self.task_id is not None and self.task_id > 0 and self.seq_id >= 0
# Speciální seq_id ve ScanPage
SCAN_PAGE_FIX = -1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment