Skip to content

Conversation

@GloriaSekyere
Copy link

  1. In create() the last line is changed from return user to use get_one(user.name) to confirm we are returning the created user not the same one we passed in the argument.
  2. delete() return type is changed from None to User since create() returns a User
  3. Check for 'if not name' condition before executing the delete query to avoid executing delete queries with an empty string
  4. In model_to_dict() function user.dict() has been changed to user.model_dump() as .dict() is deprecated.

1. In create() the last line is changed from return user to use get_one(user.name) to confirm we are returning the created user not the same one we passed in the argument.
2. delete() return type is changed from None to User since create() returns a User
3. Check for 'if not name' condition before executing the delete query to avoid executing delete queries with an empty string
4. In model_to_dict() function user.dict() has been changed to user.model_dump() as .dict() is deprecated.
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.

1 participant