Skip to content

Conversation

@courtneycmassey
Copy link

No description provided.

Copy link

@kaidamasaki kaidamasaki left a 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!

Comment on lines +12 to +15
def is_complete(self):
if self.completed_at:
return True
return False

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:

Suggested change
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]

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. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants