-
Notifications
You must be signed in to change notification settings - Fork 71
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
Paper - Courtney M #69
base: master
Are you sure you want to change the base?
Conversation
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.
Excellent job!
Your code was really clear and well organized and it seems like you put a lot of thought behind it. Well done!
def is_complete(self): | ||
if self.completed_at: | ||
return True | ||
return False |
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.
You can simplify this as:
def is_complete(self): | |
if self.completed_at: | |
return True | |
return False | |
def is_complete(self): | |
return bool(self.completed_at) |
tasks = Task.query.order_by(desc(Task.title)) | ||
else: | ||
tasks = Task.query.all() | ||
tasks_response = [task.to_dict() for task in tasks] |
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.
Nice use of a list comprehension here. 😄
No description provided.