Skip to content
Snippets Groups Projects
Commit 01505329 authored by Jiří Setnička's avatar Jiří Setnička
Browse files

db.ScanPages pomocné metody

parent 2d189a0a
No related branches found
No related tags found
No related merge requests found
...@@ -779,6 +779,12 @@ class ScanPage(Base): ...@@ -779,6 +779,12 @@ class ScanPage(Base):
user = relationship('User') user = relationship('User')
task = relationship('Task') 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 # Speciální seq_id ve ScanPage
SCAN_PAGE_FIX = -1 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