-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add to the usecase and viewmodel of the get_all_members and get… #238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,6 +40,7 @@ def __init__(self, member: Member): | |
| self.user_id = member.user_id | ||
| self.photo = member.photo | ||
| self.strikes = member.strikes | ||
| self.strikes_id = member.strikes_id | ||
| self.strikes_allowed = member.strikes_allowed | ||
| self.hours_worked = member.hours_worked | ||
|
|
||
|
|
@@ -61,6 +62,7 @@ def to_dict(self): | |
| 'active' : self.active.value, | ||
| 'user_id' : self.user_id, | ||
| 'strikes' : self.strikes, | ||
| 'strikes_id' : self.strikes_id, | ||
| 'strikes_allowed' : self.strikes_allowed, | ||
|
Comment on lines
63
to
66
|
||
| 'photo' : self.photo, | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
member_list_strike_this_semis only assigned insideif member_list_strikes:, but it’s used unconditionally to computemember.strikesandmember.strikes_id. Whenget_strike_by_target_idreturnsNone(or an empty list), this will raiseUnboundLocalError. Initializemember_list_strikesto... or []and always buildmember_list_strike_this_sem(defaulting to an empty list) before takinglen()/ mapping ids.