Skip to content

Commit

Permalink
Meddle with name field
Browse files Browse the repository at this point in the history
  • Loading branch information
George V. Kouryachy (Fr. Br. George) committed Oct 8, 2023
1 parent be2746f commit d89d26c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions hworker/depot/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class TaskScore(StoreObject):

name: str
rating: float
_public_fields: set[str] = {"ID", "USER_ID", "TASK_ID", "rating", "timestamp"}
_public_fields: set[str] = {"ID", "USER_ID", "TASK_ID", "name", "rating", "timestamp"}
_is_versioned: bool = False

def __init__(self, name: str = None, rating: float = None, **kwargs):
Expand Down Expand Up @@ -231,7 +231,7 @@ class UserScore(StoreObject):

name: str
rating: float
_public_fields: set[str] = {"ID", "USER_ID", "TASK_ID", "rating", "timestamp"}
_public_fields: set[str] = {"ID", "USER_ID", "TASK_ID", "name", "rating", "timestamp"}
_is_versioned: bool = False

def __init__(self, name: str = None, rating: float = None, **kwargs):
Expand All @@ -254,22 +254,19 @@ def __init__(self, name: str = None, content: str = None, **kwargs):
kwargs["USER_ID"] = ""
kwargs["TASK_ID"] = ""
super().__init__(**kwargs)
self.name = "Final mark"
self.content = content


class FinalScore(StoreObject):
"""Final user verdict"""

name: str
rating: str
_public_fields: set[str] = {"ID", "USER_ID", "TASK_ID", "rating", "timestamp"}
_is_versioned: bool = False

def __init__(self, name: str = None, rating: str = None, **kwargs):
kwargs["TASK_ID"] = ""
super().__init__(**kwargs)
self.name = "Final mark"
self.rating = rating


Expand Down

0 comments on commit d89d26c

Please sign in to comment.