diff options
| author | Munyoki Kilyungi | 2025-06-24 19:50:43 +0300 |
|---|---|---|
| committer | BonfaceKilz | 2025-07-07 07:58:31 +0300 |
| commit | b16283830cdfa7c3a37ce432c3a59488e42ff858 (patch) | |
| tree | eb036b4e8d7c70c70b4be4e841f5e60504e8922c /gn3/db/case_attributes.py | |
| parent | 0755a43b96299169e00e9ab057d580e99af0070c (diff) | |
| download | genenetwork3-b16283830cdfa7c3a37ce432c3a59488e42ff858.tar.gz | |
Move EditStatus to gn3.db.case_attributes.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'gn3/db/case_attributes.py')
| -rw-r--r-- | gn3/db/case_attributes.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gn3/db/case_attributes.py b/gn3/db/case_attributes.py index 7b56bc4..a5fdc53 100644 --- a/gn3/db/case_attributes.py +++ b/gn3/db/case_attributes.py @@ -1,6 +1,7 @@ """Module that contains functions for editing case-attribute data""" from typing import Any, Optional, Tuple from dataclasses import dataclass +from enum import Enum, auto import json import MySQLdb @@ -23,6 +24,17 @@ class CaseAttributeEdit: changes: dict +class EditStatus(Enum): + """Enumeration for the status of the edits.""" + review = auto() # pylint: disable=[invalid-name] + approved = auto() # pylint: disable=[invalid-name] + rejected = auto() # pylint: disable=[invalid-name] + + def __str__(self): + """Print out human-readable form.""" + return self.name + + def get_case_attributes(conn) -> Optional[Tuple]: """Get all the case attributes from the database.""" with conn.cursor() as cursor: |
